Saturday, August 05, 2006

Why there are some interfaces with no defined methods (i.e. marker interfaces) in Java?

The interfaces with no defined methods act like markers. They just tell the compiler that the objects of the classes implementing the interfaces with no defined methods need to be treated differently. Example Serializable, Cloneable etc

0 Comments:

Post a Comment

<< Home