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); } }

16th Aug 2018, 7:56 AM
So What!!
So What!! - avatar
10 ответов
+ 2
You're welcome bruh, glad if it helps : )
16th Aug 2018, 8:47 AM
Ipang
+ 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 : )
16th Aug 2018, 1:34 PM
Ipang
+ 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
16th Aug 2018, 8:02 AM
hinanawi
hinanawi - avatar
+ 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
16th Aug 2018, 8:44 AM
Ipang
+ 1
well tanx bruh..am just a beginner...nw i understand wat actually it does...
16th Aug 2018, 8:46 AM
So What!!
So What!! - avatar
+ 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
16th Aug 2018, 9:23 AM
Ipang
+ 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
16th Aug 2018, 9:32 AM
So What!!
So What!! - avatar
0
chill😎
16th Aug 2018, 8:48 AM
So What!!
So What!! - avatar
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
16th Aug 2018, 9:18 AM
So What!!
So What!! - avatar
0
tanx...dood...am on it
16th Aug 2018, 9:25 AM
So What!!
So What!! - avatar