This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 12759
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.
Consider Paul's rocket mass heater.
subject: Serializable
Similar Threads
Serializable interface.
Null interfaces in Java