关键字
abstract | assert | blooen | break | byte |
case | catch | char | class | conset |
continue | default | do | double | else |
enum | extends | final | finnally | float |
for | goto | if | impiements | import |
instanceof | int | interface | long | native |
new | package | private | protected | public |
return | strictfp | short | static | super |
switch | synchornized | this | throw | throws |
transient | try | void | volatile | while |
标识符:java所有的组成部分都需要名字。类名,变量名以及方法名。
例如
public class hello {
public static void main(String[] args) {
}
}
里面的hello是类名,main为方法名
标识符注意点
1.所有的标识符都应该以字母(A-Z或者a-z),美元符号($),或者下划线(_)开头。
2.首字符之后可以是字母,美元符号,下划线或者数字的任意组合。
3.不能以关键字作为变量名或方法名。
4.标识符对大小写敏感。
String man="";和String Man="";不是同一个
原文:https://www.cnblogs.com/jiuniang/p/14465197.html