basis

The data type

  • byte
  • short
  • int
  • long
  • float
  • double
  • boolean
  • char

The modifier

Access modifier private Default protected Public

Nonaccess modifier static final Abstract synchronized TRANSIENT volatile

The operator

The arithmetic operator + – * / % ++ —

The relational operator ==! = > < >= <=

Logical operators && | |!

An operator & | ^ ~ < < > > > > >

The assignment operator = + = = * = / = % = < < = > > = & = ^ = | =

The conditional operator (? 🙂 instanceof operator

Execute the statement

The while loop

while(Boolean expression) {// Execute the content
}
Copy the code

do… The while loop

do {
  // Execute the content
} while(Boolean expression)Copy the code

The for loop

for(expression) {// Execute the content
}
Copy the code

statement

if(Boolean expression) {// Execute the content
} else if(Boolean expression) {// Execute the content
} else(Boolean expression) {// Execute the content
}

switch(expression) {
  case value:
    // Execute the statement
    break; / / is optional
  default: / / is optional
    // Execute the statement
  }
Copy the code

object

Almost everything used in Java is an Object. An Object is an instance of a class that has state and behavior. Create objects: Objects are created from classes. Creating a new object using the keyword new requires the following three steps:

  • Declare: Declare an object, including its name and type.
  • Instantiation: Use new to create an object.
  • Initialization: When an object is created using new, the constructor is called to initialize the object.

Automatic unpacking Array String

class

In programming, objects are not created in a vacuum. If you want to create an object, you must have the corresponding template – class. Encapsulating inheritance polymorphism

The advanced

Resource management

Exception handling Enumeration (Enum) Generics program structure multithreading

Container

Collection Map class

Input/output (I/O)

Byte stream character stream

metadata