user2516848 user2516848 - 1 year ago 123
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
Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download