This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serialization

 
Debashree Halder
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I got this from a mock exam.
The output of the above code is "pcp"..why it is not "pc"?

Thanks,
 
Henry Wong
author
Marshal
Pie
Posts: 20995
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Quote Your Sources.

Thanks,
Henry
 
Debashree Halder
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this from a mock exam provided by Kathy Sierra and Bert Bates.
Refer to the following link:

SCJP Mock Exam 1.5
 
Djonatah Stiegler
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, here you go:

This is the rule:

If an object implements the Serializable interface its constructor will not run when it is deserialized. But if any of its superclass doesn't implement that interface the super constructor will always run when the object is deserialized.

Is it clear?
Thanks

[ November 20, 2008: Message edited by: Djonatah Stiegler ]
[ November 20, 2008: Message edited by: Djonatah Stiegler ]
 
Debashree Halder
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it...Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic