Naming Conventions

There are a few conventions used in naming things in Java. If you understand these conventions, it will be clearer what's going on.

First, constants are named with all caps with underscores separating the words, such as PI or SALES_TAX.

Second, classes are named with the first letter capitalized and using upper case letters to separate words, such as Applet or AudioClip.

Third, methods are named beginning with a lower case letter, but using upper case letters to separate words, such as getParameter(), printNewLine(), or pop(). The "()" simply indicate that it's a method.

Finally, varialbles are all lower case with underscores separating words, such as data_array, or current.

Return to Lesson: Using Classes

Return to the Main Menu.