0
Why does myarr[1][0] still print if i changed it to x? What purpose does this have? Thanks
public class Program { public static void main(String[] args) { int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; int x = myArr[1][0]; System.out.println(myArr[1][0] + x); } }
3 Answers
+ 4
Uhhh first of all
Why you think that it can't be printed?
0
becusse i have changed myArr[1][0] now to x?
0
wait... if i put myArr[1][0] = 100; then that will change its value.. its ok figured it out