标识符和关键字

 1 访问控制
 2 private    protected    public
 3 
 4 类,方法和变量修饰符
 5 abstract    class    extends    final    implements    interface    native    new
 6 static    strictfp    synchronized    transient    volatile
 7     
 8 程序控制
 9 break    continue    return    do    while    if    else    for    instanceof    switch
10 case    default
11     
12 异常处理
13 try    cathc    throw    throws
14 
15 包相关
16 import    package
17     
18 基本类型
19 boolean    byte    char    double    float    int    long    short    null    true    false
20 
21 变量引用
22 super    this    void
23     
24 保留字
25 goto    const

 以上是一些java的关键字,命名标识符是不能重名。

标识符命名规则:

  •  区分大小写
  • 只能以" $, A~Z, a~z, _ "开头
  • 首字母后可以" $, A~Z, a~z, _, 0~9"随意组合

 

posted @ 2021-09-12 23:33  昵称hasbeenused  阅读(77)  评论(0)    收藏  举报