物件導向程式設計
|
2.3 Java的識別名稱(Identifier) |
|
|
授課教師:陳慶瀚 WWW : http://www.miat.ee.isu.edu.tw/java E-mail : pierre@isu.edu.tw |
|
Identifiers are the names of
variables, methods, classes, packages and interfaces. Unlike literals they are
not the things themselves, just ways of referring to them. In the HelloWorld
program, Identifiers must be composed of letters, numbers, the
underscore Each variable has a name by which it is identified in the
program. It's a good idea to give your variables mnemonic names that are closely
related to the values they hold. Variable names can include any alphabetic
character or digit and the underscore _. The main restriction on the names you
can give your variables is that they cannot contain any white space. You cannot
begin a variable name with a number. It is important to note that as in C but
not as in Fortran or Basic, all variable names are case-sensitive.
The following are not legal variable names.
|
||
物件導向程式設計 義守大學電機系 陳慶瀚 2001.10.02 |