• Dear Guest, Please do NOT forget to join our JAVA JOBS (ONLY) FACEBOOK GROUP to be aware of latest JAVA openings, and you may also post any JAVA related queries/jobs.

What are the Statements in Java ?

Statements are equivalent to sentences in Natural Languages. A Statement forms a complete unit of execution. The following types of expressions can be made into a statement by terminating the expression with a semicolon (;).

1. Assignment expressions
2. Any use of ++ or --
3. Method invocations
4. Object creation expressions

Such Statements are called Expression Statements.

Examples :

a = 8933.234; ----- assignment statement
a++; ------ increment statement
System.out.println("Hello JAVA !"); ---- method invocation statement
Account acc = new Account(); ------ object creation statement

- There are two other kinds of Statements :

1. Declaration Statements : A Declaration Statement declares a variable.
2. Control Flow Statements : Control Flow Statements regulate the order in which Statements get executed.
  • Variable declaration statement[edit]
  • Assignment statements[edit]
  • Assertion[edit]
  • Program Control Flow[edit]
  • Statement Blocks[edit]
  • Branching Statements[edit]