September 2005
Beginner
576 pages
13h 6m
English
Computer programs are a set of instructions that tell the computer what to do. Each of these instructions is called a statement. The following example from a Java program is a statement:
int HighScore = 400000;
You can use brackets to group a set of statements together in a Java program. These groupings are called block statements. Consider the following portion of a program:
1: public static void main(String[] arguments) {
2: int a = 3;
3: int b = 4;
4: int c = 8 * 5;
5: }
Lines 2–4 of this example are a block statement. The opening bracket on Line 1 denotes the beginning of the block, and the closing bracket on Line 5 denotes the end of the block.
Some statements are called expressions because they involve a mathematical ...
Read now
Unlock full access