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

回到话题: Sos! help me from Polymorphism, Interface & Inner classes...

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论