官术网_书友最值得收藏!

2.8 Keywords

Keywords cannot be used for anything but their predefined purpose. There are 49 in all, These words each have a special meaning to the Java compiler. A keyword must be separated from other keywords or identifiers by white space, a comment or some other punctuation symbol.

The keywords const and goto have no meaning in Java but are included as keywords to facilitate error reporting. These are keywords in C++, a language that many Java programmers will have learned before learning Java.

關(guān)鍵字只能使用在預(yù)定義部分,關(guān)鍵字和保留字之間需要用一個(gè)空格分隔開。

In addition the symbols true and false may appear to be keywords because they cannot be used as identifiers, they are in fact boolean literals. Table 2.1 lists main keywords in Java:

Table 2.1 keywords in Java

主站蜘蛛池模板: 浦东新区| 黎川县| 定安县| 铜陵市| 昌图县| 常熟市| 南雄市| 雷山县| 柘荣县| 深州市| 景宁| 惠安县| 昌平区| 南川市| 长岭县| 长沙市| 巩留县| 德安县| 云林县| 麻城市| 漾濞| 桐庐县| 朝阳区| 哈尔滨市| 溆浦县| 深圳市| 论坛| 太湖县| 本溪| 蒙阴县| 莲花县| 兰溪市| 额尔古纳市| 沂水县| 浏阳市| 全南县| 枣强县| 明光市| 广灵县| 理塘县| 新兴县|