开发者

Java class/interface naming convention [duplicate]

开发者 https://www.devze.com 2023-04-06 11:56 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: What is standard for Interface naming in开发者_JAVA技巧 java api
This question already has answers here: Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号