J. W. Rider
10 May 2001
The basic elements of a language are not useful by themselves. The elements have to be arranged in larger groups in order to communicator the author's intention.

In a natural language, the next logical step above the parts of speech are sentences. English has the following:



Types of Sentences

Declarative
Interrogative
Imperative
Exclamatory
In Java, the analogue of a sentence is a statement.



Java Statements

Packaging package
package mypackage;
import
import java.io.*;

import mypackage.MyClass;

Declarative class/ interface
public class MyClass { ... }
public interface MyInterface { ... }
methods
public void aProcedure(){ ... }
variables
int anInt

Executable assignment
a=b+d(e);
c+=g;
f--;
method invocation
aProcedure();

Control sequence/ block
{ s1; s2; s3; }
conditional/ selection
if statement
switch statement
iteration
for statement
while statement
do statement
exception
try statement
interrupt
return statement
throw statement

1