This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Serialization doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Serialization doubt" Watch "Serialization doubt" New topic
Author

Serialization doubt

Faisal Ahmad
Ranch Hand

Joined: Aug 31, 2006
Posts: 340

Ive just read, during deserialization, the serialized object's constructor is not run. A new object is given space on the heap.

Well, without running constructor, how can we create a new object? And what does it really means "given space on the heap"?
Help appreciated! Thanks.
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Originally posted by Faisal Pasha:
Ive just read, during deserialization, the serialized object's constructor is not run. A new object is given space on the heap.

Well, without running constructor, how can we create a new object? And what does it really means "given space on the heap"?
Help appreciated! Thanks.


You don't want to create a new object. You want to read the object that was stored.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Serialization doubt
 
Similar Threads
local variables initiation
"new" keyword
How do arrays get created
Do abstract classes instantiated, so what about super()
How is final reference variable is handled?