| Author |
Q 10, Self test, K and B.
|
K Raj Kumar
Greenhorn
Joined: Sep 16, 2008
Posts: 17
|
|
Hi Ranchers, Output: 4 4 Source: SCJP 6.0 guide(K and B), page 274. Please help me in understanding the output. Thanks in advance.
|
With Regards,<br />K.Raj Kumar.
|
 |
jean-gobert de coster
Ranch Hand
Joined: Dec 04, 2008
Posts: 49
|
|
well, b1 has a size of 5 and b2 has a size of 6, then the go method modified b1 so its size is 4 and then returned a Box[] containing {b2, b1} then ma[0] = b1 so this is the same as saying b2 = b1 so b1.size = 4 and b2.size = 4, hence the output
|
 |
K Raj Kumar
Greenhorn
Joined: Sep 16, 2008
Posts: 17
|
|
Thanks Jean..
|
 |
 |
|
|
subject: Q 10, Self test, K and B.
|
|
|