*
The moose likes Beginning Java and the fly likes wat clarification on marker interface and it use 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 » Java » Beginning Java
Bookmark "wat clarification on marker interface and it use" Watch "wat clarification on marker interface and it use" New topic
Author

wat clarification on marker interface and it use

anilellendula kumar
Ranch Hand

Joined: Jul 12, 2005
Posts: 43
wat clarification on marker interface? i knew that marker interface is the an interface it doesnot have any methods, if it doesnot have any methods wat is the use of implementing this methods? as per basic java fundamentals , an interface is nothing but it has all abstract methods where u implementing an interface we need derive the methods?but wat about the case in marker interfce


Ex: serilizable interface...
Qi Liang
Greenhorn

Joined: Jun 04, 2003
Posts: 28
A good example is java.io.Serializable.

The marker interface works like a boolean flag to indicate the class implementing this interface has some capability, but there is not method involved.
anilellendula kumar
Ranch Hand

Joined: Jul 12, 2005
Posts: 43
if it doesnot have abstratct methods, how it has become interface, as per basic java , interface is nothing but it has abstract methods, where u implement an interface , we need to derive the all methods of the an interface, But in marker interface it is NOT happening , why it is called as an interface




Qi Liang
Greenhorn

Joined: Jun 04, 2003
Posts: 28
I think whether abstract method is defined is not the key that one interface becomes interface. Any way, in practice, the marker interface is used widely.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wat clarification on marker interface and it use
 
Similar Threads
what is marker interface?
What is advantage of marker interface?
wat is marker interface and it's use
What is the purpose of Marker Interfaces in Java....?
Marker Interface