• 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: 13078
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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!