posted 18 years ago
Hi,
Can someone kindly explain the following code:
What is the result?
A). pc
B). pcc
C). pcp
D). pcpc
E). Compilation fails
F). An exception is thrown at runtime
The Correct answer is c)pcp
at the comment 1 a new object is created and hence pc is printed. at comment 2 again a new object is created however this time it only prints p, Why?
I know this is some Serialization -Deserialization funda.
would be greatful if someone could kindly elaborate the point in detail.
Thanks
Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?