0
Can some one pls explain this program in the form of matrix explanation
i dnt what elements stored in what index. here is that code..... public class Program { public static void main(String[] args) { int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; System.out.println(x); } }
10 Respuestas
+ 2
You're welcome bruh, glad if it helps : )
+ 2
The return statement is used by a function to return something to the function caller. Think of functions like robots you can teach to do something, your code for the robot describes what a robot can do, the robot can accept raw materials from you, we call the raw materials "arguments". And it can output something to be given back to you, we call the output "return value".
Imagine you have a robot that can bake, you give it flour, yeast (arguments) and it return to you a bread (return value).
Hope you understand bruh : )
+ 1
a jagged array is an array of arrays
when you do myArr[0], that points to the first array
when you do myArr[0][2], that points to the third item in the first array
myArr[1][0] points to the first item in the second array
+ 1
One way to understand multidimensional arrays better is to break them into multiple lines, where each line consists of columns (index) like a spreadsheet;
int[][] myArr = {
Column or index →
Row ↓ 0 1 2
0 {1, 2, 3},
1 {4},
2 {5, 6, 7}
};
Hth, cmiiw
+ 1
well tanx bruh..am just a beginner...nw i understand wat actually it does...
+ 1
Check this out bruh! it's called "access modifier" it is used to limit accessibility:
https://www.sololearn.com/learn/Java/2156/?ref=app
+ 1
what is actually returning a value mean....sumtimes tey say it returns and suntimes tey it returns value zero....nd wat is the meaning of the following statement...
return 0;
am a mechanical engg dood,, jst vry curious abt programming so pls dnt get pissed off on me fr asking questions again nd again
0
chill😎
0
bruh!! one more doubt..,
cud u please give an explanation(detailed) on the following methods....java
*just ''void main()''
*static void
*private void
and whats the difference between these following..,creating class
*just "class name
*pubilc class name
0
tanx...dood...am on it