user2516848 user2516848 - 7 months ago 87
Java Question

Null vs Marker Interface

Can anyone elaborate that what is the core difference between Null interface and Marker interface in Java. I have been asked this question in one of the interview.


mtk mtk

Null interface is just another name for Marker Interface or the other way round. They are used interchangeably as far as I know.

These are just interface with no methods in them. Examples of marker interfaces are : Serializable, Cloneable.