nata.r<br />**********************************<br />To win is not always success<br />And to lose is not always failure.<br />**********************************
SCJP2
nata.r<br />**********************************<br />To win is not always success<br />And to lose is not always failure.<br />**********************************
SCJP2
Given byte b2[][][][] = new byte [2][3][1][2];
the following are true:
b2 is a 4dimensional array
b2[0] is a 3dimensional array//isn't that a 1dimensional array?
b2[0][0] is a 2dimensional array
b2[0][0][0] is a 1dimensional array//isn't this a 3D array?
b2[0][0][0][0] is a byte
Kapil Munjal
SCJP 1.4, SCWCD 1.4
Originally posted by Nata Raman
a) b2[0][2]=b; b) b[0][0]=b3; c) b2[1][1][0]=b[0][0]; d) b2[1][2][0]=b;
d) b2[0][1][0][0] = b[0][0]; f) b2[0][1] = big;
The answers are a,b,e and f. The explanation states that "If an array is declared as a two dimensional array, you can't assign a one dimensional array to a onedimesional array reference"
What's that? If i declare an array as two dimesional what does the one dimensional array got to do with that?
<br />SCJP 1.4
nata.r<br />**********************************<br />To win is not always success<br />And to lose is not always failure.<br />**********************************
"I know this defies the law of gravity... but I never studied law." B. Bunny Defiant tiny ad:
The trailboss has a kickstarter
https://coderanch.com/t/754577/GardenMasterkickstarter
