File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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
I agree. Here's the link:
subject: regarding Serialization
It's not a secret anymore!