How do you get the size of each dimension?
Printable View
How do you get the size of each dimension?
Hummm maybe like this?
int[][] i = new int[4][6];
int len = i.length;
System.out.println("First dimension " + len);
for(int k = 0; k < len; ++k){
System.out.println("Second dimension" + i[k].length);
}
Yes, thank you. I don't know why I didn't try that!
sneed