1. Home
  2. Computing & Technology
  3. Java

Statement

By , About.com Guide

Definition:

Statements are similar to sentences in the English language. A sentence forms a complete idea which can include one or more clauses. Likewise, a statement in Java forms a complete command to be executed and can include one or more expressions.

There are three main groups that encompass the different kinds of statements in Java:

  • Expression statements: these change values of variables, call methods and create objects.
  • Declaration statements: these declare variables.
  • Control flow statements: these determine the order that statements are executed.

Examples:
//declaration statement
int number;

//expression statement
number = 4;

//control flow statement
if (number < 10 )
{

  //expression statement
  System.out.println(number + " is less than ten");
}

Glossary:

# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Explore Java
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Java
  4. Java Glossary
  5. S
  6. Statement - Definition for the Term: Statement>

©2009 About.com, a part of The New York Times Company.

All rights reserved.