Two Laptop Bag*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 346

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.
 
jQuery in Action, 2nd edition
 
subject: Serialization doubt
 
Similar Threads
How is final reference variable is handled?
How do arrays get created
Do abstract classes instantiated, so what about super()
local variables initiation
"new" keyword