1.Java Language-Keywords
Keywords: words that are given special meaning by the Java language, characterized by all lowercase letters.
Java involves the collation of keywords:
| Keywords to define the data type |
|
Class |
Interface |
Byte |
Short |
Int |
|
Long |
float |
Double |
Char |
Boolean |
|
void |
|
|
|
|
| Keywords to define data type values |
|
true |
False |
Null |
|
|
| Keywords to define Process Control |
|
if |
Else |
Switch |
Case |
Default |
|
While |
Do |
For |
Break |
Continue |
|
Return |
|
|
|
|
| Keywords used to define access rights modifiers |
|
Private |
Protected |
Public |
|
|
| Keywords for defining classes, functions, variable modifiers |
|
Abstract |
Final |
Static |
Synchronized |
|
| Used to define instance and reference instances, and to determine the keywords |
|
New |
This |
Super |
instanceof |
|
| Keywords for exception handling |
|
Try |
Catch |
Finally |
Throw |
Throws |
| Keywords for the package |
|
Package |
Import |
|
|
|
| Other modifier keywords |
|
Native |
Strictfp |
Transient |
Volatile |
Assert |
2.Java Language-Identifiers
Identifiers match the required symbols with only two _ and $, and 0-9 and 26 letters combined to require non-keywords that cannot start with a number!
3.Java language-Notes
In addition to the common single-line comments and multiline comments, a Java-specific notation is recorded here-documentation comments, which can be used to illustrate the written source code, and the difference between the multiline annotations is that the Java tool Javadoc tool can be used to extract the document annotations in Java, Generate a manual (HTML) with the structure as follows:
/**
Document comments
*/
4.Java language-Binary conversion
Octal number, in fact is the binary system in 3 bits for an octal bit;
The hexadecimal number, in fact, is the binary 4 bits for a hexadecimal bit.
5.Java language-binary representation of negative numbers
The negative expression is actually the positive number of the binary inverse plus 1;
Rule: Any negative number its binary highest bit is 1.
6.Java Language-variables
Variable three elements: type, name, numeric value.
The scope of the variable (valid between a pair of {}).
Data types include the base data type (integer type (byte,short,int,long), floating-point type (float,double), character type (char), Boolean), reference data type (Class), Interface ( interface), array ([]))
Integer default: int, decimal default: Double
7.Java language-type conversion
Automatic type conversion (implicit type conversion): Numeric data operations, different data types will be automatically type promotion, the occupation type is larger!
Forcing type conversions (explicit type conversions)
The addition of characters and numbers results in a numerical result. The internal principle is calculated according to the Code table, or the International Standard Code table (Unicode)!
Introduction to Java Basics essay (2) version javase