aspose file tools*
The moose likes Beginning Java and the fly likes About Serialization and DeSerialization process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About Serialization and DeSerialization process" Watch "About Serialization and DeSerialization process" New topic
Author

About Serialization and DeSerialization process

Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
Hi....



My dout is which constructor is called during the deserialization process? Is class A is serialized automatically when Class B is serialized?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10520
    
    9

raj chiru wrote:
My dout is which constructor is called during the deserialization process?


Very easy to have println statements in both the constructors and find out for yourself isn't it?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
Hi.....Maneesh
Thanks for your reply,

Just now i executed the programme,so constructor A() is called. but my dout is why constructor A() is called during deserialization process?what about class B constructor?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10520
    
    9

This is a very nice article to explain serialization mechanism
http://java.sun.com/developer/technicalArticles/Programming/serialization/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Serialization and DeSerialization process