I really appreciate your example. Just one addendum.

jabber (jabber)
Interfaces have many uses in Java. One is to introduce new data types. For instance, java.lang.String is an Object, but it is also a Serializable, a Comparable.

By the way, it is not necessary for an interface to contain some methods and/or static final constants. It may be empty! The example is Serializable, Cloneable. Such interfaces just introduce Data types, not any methods or final static constants.
Such a design is called the Marker Pattern.
2000-11-29 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: Sos! help me from Polymorphism, Interface & Inner classes...

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论