6.关键字

6. 关键字

​ java中有一些字符串是预留的,称之为关键字。在IDE关键字往往会以特殊方式高亮显示,标识出来。

​ java的关键字都是小写英文字母。

​ 下表是关键词列表:

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
short static strictfp super
switch synchronized this throw
throws transient try void
volatile while
null true false

​ java保留字:true,false,null

​ goto和const 目前暂未使用,但也被作为java关键字保留。

posted @ 2023-01-11 11:39  技术成就自我  阅读(97)  评论(0)    收藏  举报