"Java basics of" Java identifiers, reserved words, and several system

.Java an identifier
naming the notation used in the program of the programmer when the various elements to be referred to as identifier name (identifier). Java language, the identifier is a letter, underscore (_), a sequence of characters dollar sign ($) beginning, possibly followed by letters, underscores, dollar signs, digital. For example, identifier, userName, User_Name, _sys_val , $ change is valid identifier, and 2mail room #, class illegal identifier.
Two .Java reserved words
have special meaning and purpose, not as a general identifiers, these identifiers called reserved words (reserved word), also known as keywords, reserved words below lists all java language :
bstract, BREAK, byte, boolean, the catch, Case, class, char, the Continue, default, Double, do, the else, the extends, false, Final, float, for, a finally, IF, Import, the implements, int, interface, instanceof , long, length, native, new , null, package, private, protected, public, return, switch, synchronized, short, static, super, try, true, this, throw, throws, threadsafe, transient, void, while.

java language reserved words are lowercase letters.
III. Number system
number system can be said that the contents of pure mathematics, but in the computer language development, used more frequently. In programming languages, number system generally includes a binary, octal, decimal and hexadecimal.

1. Binary
Binary features: there are two numbers: "0" and "1"; a binary arithmetic Comes.

For example: 1100110011,10000001.

2. Octal
octal wherein: there are eight digit: "0", "1", "2", "3", "4", "5", "6", "7"; operation comes just octal a.

For example: 014,729.

Note: octal data prefix a zero. It is often confused with the binary, it is proposed in Java programming, it is best not to use octal.

3. Hex
hex feature: 16 digit: "0", "1", "2", "3", "4", "5", "6", "7", "8 "," 9 "," a "," B "," C "," D "," E "," F "; operation comes at a hexadecimal.

For example: 0XB.

Note: Hex with A, B, C, D, E, F, respectively 10-15 five letters. The letters are not case sensitive. Hexadecimal data has a prefix of 0X.

4. Decimal
decimal features: there are 10 digits: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"; 10 comes just into a calculation.

For example: 89, 92.

Reference: https: //blog.csdn.net/u013806647/article/details/38320139

Guess you like

Origin www.cnblogs.com/jssj/p/11114041.html