+ 2

public class Program { public static void main(String[] args) { int[ ][ ] sample = { {1, 2, 3}, {4, 5, 6} };

how did the answer come 4???? plz help me..

25th Oct 2017, 11:56 AM
Hasrat Wadsariya
Hasrat Wadsariya - avatar
5 Answers
+ 22
But what is the question?
25th Oct 2017, 12:03 PM
Igor Makarsky
Igor Makarsky - avatar
+ 7
There are many ways to get 4 System.out.print(sample[0][1]*2); System.out.print(sample[0][0] + sample[0][2]); System.out.print(sample[1][0]); ....etc
25th Oct 2017, 12:53 PM
RZK 022
RZK 022 - avatar
+ 4
System.out.println(sample[1][0]);
25th Oct 2017, 12:40 PM
Daniel
Daniel - avatar
+ 4
Ok thanks atikrant negi
25th Oct 2017, 12:57 PM
Hasrat Wadsariya
Hasrat Wadsariya - avatar
0
System.out.println(sample[1][0]);
25th Oct 2017, 3:41 PM
AleoHu