What are the Statements in Java ?

Discussion in 'Flow Control' started by vbraojava, Sep 17, 2008.

  1. vbraojava

    vbraojava New Member

    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.
     
  2. anneroberts

    anneroberts Member

    • Variable declaration statement[edit]
    • Assignment statements[edit]
    • Assertion[edit]
    • Program Control Flow[edit]
    • Statement Blocks[edit]
    • Branching Statements[edit]
     

Share This Page