Hi once again How can I get the length of 2 dimensional array in a method? to make myself clear: main() { compute(emp);//method call } int[][] compute(int emp1[][]) { int result =emp1[][].length; // or how? } please help?
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
posted
0
Hi Ravi, Try running this and you should fully understand how it works:
Just try to think of a multidimensional array as being an array of arrays. Hope this helps, Michael Morris [ February 07, 2003: Message edited by: Michael Morris ] [ February 07, 2003: Message edited by: Michael Morris ]
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
subject: How do u get the length of 2 dimensional array?