September 2005
Beginner
576 pages
13h 6m
English
Variable names in Java can begin with a letter, underscore character (_), or a dollar sign ($). The rest of the name can be any letters or numbers, but you cannot use blank spaces. You can give your variables any names you like under those rules, but you should be consistent in how you name variables. This section outlines the generally recommended naming method for variables.
Watch Out!Java is case-sensitive when it comes to variable names, so you must always capitalize variable names in the same way throughout a program. For example, if the gameOver variable is used as GameOver somewhere in the program, the use of GameOver will cause an error when you compile the program. |
For starters, the name you give a variable will ...
Read now
Unlock full access