"array" was my general variable name for an array in my example. You of course would use the name of your variable. Common sense!
Type: Posts; User: Junky
"array" was my general variable name for an array in my example. You of course would use the name of your variable. Common sense!
I just told you why. You have declared myNumbers as a 2D array.
Simple answer: you need two indices to access an element (array[x][y]).
Long answer: a 2D array is a 1D array of 1D arrays. So each...
myNumbers[i]=sc.nextInt();
You have declared myNumbers as a 2D array but are trying to use it like a 1D array.