Friday, October 5, 2012

What do you call the interface without any members ?

An interface without any members is called marking interface or tagging interface. It marks the class objects for a special purpose. For example, Clonable(java.lang) and Serializable(java.io) are two marking interfaces. Clonable interface indicates that a particular class objects are cloneable while Serializable interface indicates that a particular class objects are serializable.

No comments:

Post a Comment