Reserved word保留字就是已經定義好並且有功用的字

以下就介紹Java的保留字

 

 

1. 官網 https://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html

abstract   continue  for               new          switch
assert      default    goto             package    synchronized
boolean   do           if                 private      this
break      double    implements   protected   throw
byte        else        import          public     throws
case        enum     instanceof     return     transient
catch       extends  int               short      try
char        final       interface       static     void
class       finally     long            strictfp   volatile
const      float       native          super      while

其中
goto, const 已經沒在使用
strictfp 在1.2內加入
assert 在1.4內加入
enum 在5.0內加入

01.png

 

 

arrow
arrow
    文章標籤
    Java keywords Java reserved words
    全站熱搜

    RX1226 發表在 痞客邦 留言(0) 人氣()