標籤:prot private for protected ret ade style 其他 字元
一、標識符 概念:就是用於給程式中的變數、類、方法命名的符號; 標識符規則:標識符可以有字母、數字、底線_、和貨幣符號$組成,並且數字不能打頭 標識符不能使java關鍵字和保留字,但可以包含關鍵字和保留字 標識符不能包含空格 標識符只能包含貨幣符號$,不能包含@、#等其他特殊字元 分隔字元:分號; 花括弧{} 方括弧[] 括弧() 空格 圓點.;二、Java關鍵字 java中包含50個關鍵,所有關鍵字都是小寫 關鍵字列表: abstract抽象的 assert boolean break byte case catch char const(保留字) continue default do double else enum extends final finally float for if goto(保留字) implements import int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while the literals true,false,and null are lowercase,not uppercase as in the C++ language.Strictky speaking,these are not keyworrds but literals;however,the distinction is academic。 三個特殊的直接量(literal);true false null 都不是關鍵字,但這個區別只是學術上的。所以,它們不可以做為標識符。 轉載於:http://www.cnblogs.com/fkrcode/p/6006386.html
JAVA標識符和關鍵字