This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Basically we have a three dimensional array, which is nothing more than an array of an array of an array.
The first loop goes through the first array, which holds a 2D array. The second loop goes through the second array and constructs a third array at the index of [i][j]. Then it simply prints out the length of the newly created 3D arrays.
Joined: Aug 06, 2005
Thank u.. But How the output be 11? plz explain me..
The nested loop (the second one) goes through each element of the second array. So the first iteration of the outter loop (on x) will cause the inner loop to 4 times (x[i].length), then 5 times, then 2. 11 LINES of out put all up.
Maybe i didn't explain myself properly, it's just that my boss is walking around and i pause, then unpause the explanation.