Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Serializable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Serializable" Watch "Serializable" New topic


psr krishna

Joined: Oct 05, 2000
Posts: 12

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
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
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.
I agree. Here's the link:
subject: Serializable
It's not a secret anymore!