Minggu, 19 Januari 2014

Tokens and its Types used in NetBeans: Java

In a passage of text, individual words and punctuation marks are called tokens. In fact, every unit that makes a sentence in Java programming is a token.
The smallest individual unit in a program is known as a Token.
Java has the following types of tokens:

Keywords

Keywords are the words that convey a special meaning to the language complier. These are reserved for special purpose and must not be used as normal identifier names.

The following character sequence, formed from ASCII letters, are reserved for use as keywords and cannot be used as identifiers:
Keywords and its Types used in NetBeans: Java
The keywords const and goto are reserved, even though they are not currently used. This may allow a Java complier to produce better error message if these Java keywords incorrectly appear in programs.

While true and false might appear to be keywords, they are technically Boolean literals. Similarly, while null might appear to be keywords, it is technically the null literal. Thus true, false and null are not keywords but reserved words.

Tidak ada komentar:

Posting Komentar