It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes How does a marker interface work? 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 "How does a marker interface work?" Watch "How does a marker interface work?" New topic
Author

How does a marker interface work?

Sanchita SenSharma
Greenhorn

Joined: Sep 01, 2008
Posts: 1
Since a marker interface doesnt have any method declaration, how does the JVM understand what functionality should it support. For eg: Serializable is a marker interface. Now how does the JVM understands that it has to serialize the method of the class that implements it?
chander shivdasani
Ranch Hand

Joined: Oct 09, 2007
Posts: 206

Marker interface is a design pattern which is used to indicate that a particular class supports some kind of functionality

In case of Serializable, a class implements this interface to indicate that its non-transient data members can be written to an ObjectOutputStream


Enjoy, Chander
SCJP 5, Oracle Certified PL/SQL Developer
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Welcome to JavaRanch.

Please use the "Search" link at the top of the page to find the many, many threads where this question has been asked.
 
Have you checked out Aspose?
 
subject: How does a marker interface work?
 
It's not a secret anymore!