Understanding Java Identifiers
Q: Is the identifier God horse?
A: Identifiers are symbols that are used to name variables, classes, methods, and so on in a Java program.
650) this.width=650; "src=" http://img.mukewang.com/5358910f00018c2c07320199.jpg "/>
There are several rules to follow when using identifiers:
1. Identifiers can consist of letters, numbers, underscores (_), dollar symbols ($) , but cannot contain other special characters, such as @,%, space, etc. , and cannot begin with a number . For example: 123name is not legal drop
2. Identifiers cannot be Java keywords and reserved words (Java reserved keywords, which may be used as keywords in later versions of the upgrade), but can contain keywords and reserved words. For example, void may not be used as an identifier, but myvoid can
3. Identifiers are strictly case-sensitive . So nirvana, be sure to distinguish between Chu Imooc and Imooc is two different identifiers Oh!
4. the name of the identifier should best reflect its role, to be known .
public class HelloWorld{
public static void Main (string[] args) {
System.out.println ("Hello Imooc");
}
}
This article is from "Ghost" blog, please make sure to keep this source http://caizi.blog.51cto.com/5234706/1547638
Java Basics---Java Identifiers (ii)