|
-
Sep 17th, 2003, 05:59 PM
#1
Thread Starter
Hyperactive Member
2 dimensional array size
How do you get the size of each dimension?
-
Sep 18th, 2003, 12:25 AM
#2
Dazed Member
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);
}
-
Sep 18th, 2003, 11:00 AM
#3
Thread Starter
Hyperactive Member
Yes, thank you. I don't know why I didn't try that!
sneed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|