Marker interfaces are those which do not declare any required methods, but signify their compatibility with certain operations. The java.io.Serializable interface and Cloneable are typical marker interfaces. These do not contain any methods, but classes must implement this interface in order to be serialized and de-serialized.
Tagged Interface , Ability Interface , Null Interface , Empty Interface, Blank Interface as it does not contain any fields or methods.
Serializable interface. Serializable is a marker interface (has no data member and method). It is used to 'mark' Java classes so that the objects of these classes may get a certain capability. The Cloneable and Remote are also marker interfaces. It must be implemented by the class whose object you want to persist.
Have this class implement java.lang.Cloneable interface and overide the method java.lang.Object.clone() method. Note that clone() method does not belongs to Cloneable interface. Cloneable interface is a marker interface.
java.io.Serializable is a marker interface. No methods should be implemented.
They are another name for marker interfaces. taged interfaces are interfaces, which have no methods and which gives some special properties to our object through JVM.
Ads By Google
© 2018 - JavaSpartans.com • All Rights Reserved