What are the naming conventions?
• Package names are guaranteed uniqueness by using the Internet domain name in reverse order: com.javasoft.jag – the “com” or “edu” (etc.) part used to be in upper case, but now lower case is the recommendation. • Class and interface names are descriptive nouns, with the first letter of each word capitalized: PolarCoords. Interfaces are often (not always) called “something-able”, e.g. “Runnable”, “Sortable”. Caution: java.util.Observable is not an interface, though java.util.Observer is. These two are poorly designed. • Object and data (field) names are nouns/noun phrases, with the first letter lowercase, and the first letter of subsequent words capitalized: currentLimit • Method names are verbs/verb phrases, with the first letter lowercase, and the first letter of subsequent words capitalized: calculateCurrentLimit • Constant (final) names are in caps: UPPER_LIMIT • Other sites: JLS 6.8 Naming Conventions • (Sect. 6) Should I prefer importing {package}.{class} over {package}.*? Does i
The naming conventions are straightforward: Package names are guaranteed uniqueness by using the Internet domain name in reverse order: com.javasoft.jag – the “com” or “edu” (etc.) part used to be in upper case, but now lower case is the recommendation. Class and interface names are descriptive nouns, with the first letter of each word capitalized: PolarCoords. Interfaces are often (not always) called “something-able”, e.g. “Runnable”, “Sortable”. Caution: java.util.Observable is not an interface, though java.util.Observer is. These two are poorly designed. Object and data (field) names are nouns/noun phrases, with the first letter lowercase, and the first letter of subsequent words capitalized: currentLimit Method names are verbs/verb phrases, with the first letter lowercase, and the first letter of subsequent words capitalized: calculateCurrentLimit Constant (final) names are in caps: UPPER_LIMIT Also in the FAQ: Other sites: JLS 6.8 Naming Conventions • (Sect.