+ 1

What does “myArr[0][2] = 42;” here mean?

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

2nd Jan 2018, 6:28 AM
Dcm
1 Answer