The null interface is an example of a marker interface.
An interface is a different type. which basically extend the interface, the markble interface, and the marker interface.
The difference between Inteface and others is that marker interfaces have no methods. For example: - serializable - for serialization. remote - for remote communication. Your remote interface should extend this token interface. when your remote interface extends the token interface, it is called the advanced interface.
They simply tell the compiler that objects of this class need to be treated differently. some marker interfaces: Serializable, Remote, Cloneable
the code:
interface markerImp { } class MarkerTest implements markerImp { } public class TestInstanceOf { public static void main(String []args) { MarkerTest mt = new MarkerTest(); if(mt instanceof markerImp) { System.out.println("True"); } else { System.out.println("False"); } } }
Manish doshi
source share