An Overview of Java Statements : Statement « Statement Control « Java Tutorial

  1. In programming, a statement is an instruction to do something.
  2. It controls the sequence of execution of a program.
  3. In Java, a statement is terminated with a semicolon and multiple statements can be written on a single line.
x = y + 1; z = y + 2;

In Java, an empty statement is legal and does nothing:


4.1.1.An Overview of Java Statements
4.1.3.Declaring and defining multiple variables in a single statement
4.1.4.Label a statement block
4.1.5.Spreading a single declaration over several lines
4.1.6.How to write multiple assignments in a single statement
4.1.7.Combining both statements into one
4.1.8.Statement Blocks