Coding style
Posted
on March 1st, 2001
| Bruce Eckel's Thinking in Java | Contents | Prev | Next |
The
unofficial standard in Java is to capitalize the first letter of a class name.
If the class name consists of several words, they are run together (that is,
you don’t use underscores to separate the names) and the first letter of
each embedded word is capitalized, such as:
class
AllTheColorsOfTheRainbow { // ...
For
almost everything else: methods, fields (member variables) and object handle
names, the accepted style is just as it is for classes
except
that the first letter of the identifier is lower case. For example:
class AllTheColorsOfTheRainbow { int anIntegerRepresentingColors; void changeTheHueOfTheColor(int newHue) { // ... } // ... }

Comments
There are no comments yet. Be the first to comment!