Statements in Java are divided into six categories:
1. Method call statement:
System.out.println(Hiwww.dotcpp.com);
2. Expression statement:
A statement is composed of an expression, that is, a semicolon is added to the end of the expression.
x=1;
3. Compound statement:
Statements enclosed in {}.
{x=1;System.out.println(Hiwww.dotcpp.com);}
4. Empty statement:
A semicolon is also a statement, called an empty statement.
5. Control statements:
Control statements are divided into conditional branch statements, switch statements and loop statements.
6. package statement and import statement:
The package statement and import statement are related to classes and objects.