• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding Serialization

 
surya.raaj prakash
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Implied but not stated in the API for java.io.Serializable 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 java.io.Serializable
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic