關(guān)鍵字列表
abstract boolean break byte case
catch char class continue default
do double else extends false
final finally float for if
implements import instanceof int interface
long native new null package
private protected public return short
static super switch synchronized this
throw throws transient true try
void volatile while
保留字
&n bsp;const,goto
注意點(diǎn)
識(shí)別java語言的關(guān)鍵字,不要和其他語言如c/c++的關(guān)鍵字混淆。
?
const和goto是java的保留字。
所有的關(guān)鍵字都是小寫
friendly,sizeof不是java的關(guān)鍵字
1. 標(biāo)識(shí)符變量,類與方法都需要一定的名稱,我們將這種名稱叫做標(biāo)識(shí)符.java中對(duì)標(biāo)識(shí)符有一定的限制.首先:所有的標(biāo)識(shí)符的首字符必須是字母(大小寫).下劃線_或美元符¥;其次標(biāo)示符是由數(shù)字(0--9),所有從a--z的大寫字母.a--z的小寫字母與下劃線_.美元符¥與所有在十六進(jìn)制0xc0前的 ascii碼等構(gòu)成;第三注意表示符不能使用系統(tǒng)保留的關(guān)鍵字做標(biāo)示符.
posted on 2008-05-14 20:50
happytian 閱讀(437)
評(píng)論(0) 編輯 收藏