Java class/interface naming convention [duplicate]
Possible Duplicate:
What is standard for Interface naming in开发者_JAVA技巧 java api
Why is a *able word used for a class such as Throwable
, since this convention is primarily used for interfaces (e.g., Cloneable
, Serializable
, etc.)?
I don't think there is a convention that says that the able
suffix can only be used for interface. Its just a suffix to denote what the class would be capable
of.
Many of the classes which don't appear to follow convention date back to Java 1.0. i.e. before the conventions were established.
E.g. Cloneable is an interface is associated with the method clone() which its says in its Javadoc should be made public, but doesn't include it in its interface.
精彩评论