Statements

A statement is the smallest executable unit in a program, and is terminated by a semicolon. For example, line 13 reads

radius = Integer.parseInt(args[0]);


One or more statements can be combined to form a block. A block is enclosed by braces {and}. All the code making up the main method, lines 9–18, is a block. Blocks can be nested to any depth, in our example, the main block is enclosed by the Circle class block.

No comments:

Post a Comment