Hi DimiBy, ages is an one dimension array which has 10 items, each of item again is one dimension array which has 5 items... so, ages.length = 10 ages[0].length = 5 ages[1].length = 5 ...
Hope this help ! Regards, Doan Nguyen Dinh On Sun, Oct 17, 2010 at 5:13 AM, DimiBy <dimiby.alle...@gmail.com> wrote: > Hi > > Explain to me please. Why from code > > // Declare and create two dimensional int array whose size is 10 by 5 > int[][] ages = new int[10][5]; > > // Display the number of rows and columns > System.out.println("ages.length = " + ages.length); > System.out.println("ages[1].length = " + ages[1].length); > > > > ages.length will be 10 and ages[1].length will be 5? I thought that > lenght of array is 10*5 > > Cant undestand. Help! > > -- > To post to this group, send email to > javaprogrammingwithpassion@googlegroups.com > To unsubscribe from this group, send email to > javaprogrammingwithpassion+unsubscr...@googlegroups.com<javaprogrammingwithpassion%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en -- To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en