then是java關(guān)鍵字嗎
then不是java關(guān)鍵字,也不是java保留字。
Java 關(guān)鍵字列表(51個(gè)關(guān)鍵字,2個(gè)保留字):
訪(fǎng)問(wèn)控制:private protected public
定義類(lèi)、接口、抽象類(lèi)和實(shí)現(xiàn)接口、繼承類(lèi)的關(guān)鍵字、實(shí)例化對(duì)象:class abstact interface extends implements new
修飾方法、類(lèi)、屬性和變量:static final super this native strictfp synchronized transient volatile
程序控制語(yǔ)句:break continue return do while if else for instanceof switch case defautl
錯(cuò)誤處理:try catch final throw throws assert
包相關(guān):import package
基本類(lèi)型:boolean byte char double float int long short null true false enum
變量引用:super this void
保留字:const goto
正確識(shí)別java語(yǔ)言的關(guān)鍵字(keyword)和保留字(reserved word)是十分重要的。Java的關(guān)鍵字對(duì)java的編譯器有特殊的意義,他們用來(lái)表示一種數(shù)據(jù)類(lèi)型,或者表示程序的結(jié)構(gòu)等。保留字是為java預(yù)留的關(guān)鍵字,他們雖然現(xiàn)在沒(méi)有作為關(guān)鍵字,但在以后的升級(jí)版本中有可能作為關(guān)鍵字。
注意點(diǎn)
識(shí)別java語(yǔ)言的關(guān)鍵字,不要和其他語(yǔ)言如c/c++的關(guān)鍵字混淆。
所有的關(guān)鍵字都是小寫(xiě)
php中文網(wǎng),大量的免費(fèi)Java入門(mén)教程,歡迎在線(xiàn)學(xué)習(xí)!