标识符
解释:类名,变量名,以及方法名都被称为标识符
标识符有哪些
大约 abstract,assert,boolean,break,byte,case,catch,char,class,const,continue,default,do,double,
else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,
native,new,package,private,protected,public,return,strictfp,short,static,super,switch,sychronzed,
this,throw,throws,transient,try,void,volatile,while等。
注意点
1.所有的标识符都应该以字母(A-Z或者a-z),美元符($),或者下滑线开始
2.首字母之后可以是字母(A-Z或者a-z)、美元符($)、下划线或者数字的任何字符组合
3.不能试用关键字作为变量名或者方法名
4.标识符是大小写敏感的
public class Demo1 {
public static void main(String[] args) {
String 英雄联盟="王者";
System.out.println(英雄联盟);
String Man="tianxia";
String man="tianxia";
String Ahello="tianxia";
String hello="tianxia";
String $hello="tianxia";
String _hello="tianxia";
String hello1="tianxia";
}
}