dcsimg
Serializable is an marker interface- Why do we use it as !_NEWLINE_!an interface why not as a keyword.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dushyant_Bhardwaj
Posted On:   Sunday, July 28, 2002 05:07 AM


Serializable is an marker interface in java,When we say
something about interface it leads to a concept of
implementing its methods. Since it is a marker
interface so we are not implementing any method it is just acting as mark to the serialization mechanism that now the object of this class can be serialzed.

Why didn't the Engineers at SUN made it as a keyword.



Similar is true for Cloneable .


Kindly reply.

Re: Serializable is an marker interface- Why do we use it as !_NEWLINE_!an interface why not as a keyword.

Posted By:   Eugene_Kuleshov  
Posted On:   Sunday, July 28, 2002 08:34 PM

That marker interface enable the default serialization. You forgot that you can redefine the behaiour and implement custom serialization. So, they just use generic OO practices.
About | Sitemap | Contact