Hello
I was just dabbling in the serialization code given in K. Sierra book on
SCJP.
I ran the following code snippet
Now according to the book, as the collar class has not implemented serializable interface, to bypass that I created a transient object of type collar in dog class. According to the book, such an action will compile the code, but at runtime will throw a NullPointerException as the state of the 'thecollar' object wasn't saved. Now I know I'm missing something in the code, but can't get hold of it.. probably just too tired today.
I hope someone can point out. And I'm just a newbie in
java, So please don't tell me how stupid question it was --> I already know that