Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serializable

 
psr krishna
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi
Can anyone clear my doubt
that is...
How an object which is implementing "Serializable" interface is eligible for serialization without inhereting any properties from Serializable interface since Serializable interface do not defined any methods(behaviour).
thanks inadvance
---shivaram
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is just a tag that is used internally - somewhere in the serialization code there is code like:
if( obj instanceof Serializable ) ....
Java has several of these interfaces used only for tags. Cloneable is another one.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic