This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes regarding Serialization 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 » Java » Beginning Java
Bookmark "regarding Serialization" Watch "regarding Serialization" New topic

regarding Serialization

surya.raaj prakash
Ranch Hand

Joined: Oct 30, 2009
Posts: 76
Hi Friends,

I have doubt regarding Serialization.
if the class A implements serializable.
My Question is The Serializable interface is known as a maker or tag interface,because the interface doesn't have any method to implement.How class(class A) will serializable if the interface doesn't have any methods? and How it possible?
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Implied but not stated in the API for is that while classes that require special serialisation and deserialisation instructions can use the methods readObject and writeObject, a serialisable Class that does not have these methods will still have a default serialisation and deserialisation. ie the JVM does it for you as long as the Class implements
subject: regarding Serialization
Similar Threads
why Serializable has no method and constant in it?
marker interface
some about apache tomcat session?
what are the classes that supports a class when it is serialized?
How to create object as Serializable?