javascript
Brief description  about Online courses   join in Online courses
View Muruli M 's Profile

Explain the purpose of Marker Interface.When there is no methods in marker interface then what is the use of implementing it?

Marker Interface is a Java interface which doesnt have any methods in it. Marker Interfaces are Serializable clonable Singlethreaded model Event listener. Marker interfaces are implemented by the class or its super class inorder to add some functionality.
Asked by Muruli M | May 9, 2010 |  Reply now
Replies (1)
View Java Teacher 's Profile
In java language programming, interfaces with no methods are known as marker interfaces. Marker interfaces are Serializable, Clonable, SingleThreadModel, Event listener. Marker Interfaces are implemented by the classes or their super classes in order to add some functionality.


suppose you want to persist the state of an object for that we have to implement Serializable interface.
One more example.........if you want to made a clone of an object then you have to implement Clonable interface........
Dec 29, 2010