MARKER INTERFACE IN JAVA

 MARKER INTERFACE 

if interface doesn't contain any method and by implementing that interface our object will get some ability 

such type of interface is called as marker interface.


eg --

serializable interface :

public interface serializable ,cloneable{

//not contain body

}

By implementing serializable interface our object can be saved to the file and can travell across network.



cloneable interface

By implementing cloneable interface our object can produce exactly duplicate clone object.


internally JVM is providing required ability in marker interface



Comments

Popular posts from this blog

OBJECT ORIENTED CONCEPTS

Arrays programms