2.2 From Classes to Statements
Programs are sequences of operations that consist of statements at their core. These statements are assembled into larger building blocks, the methods, which in turn form classes. Classes themselves are collected in packages, and a collection of packages is delivered as a Java archive .
2.2.1 What Are Statements?
Java belongs to the imperative programming languages , in which the programmer specifies the processing steps of algorithms by means of statements . Statements may include the following elements:
-
Expression statements, for example, for assignments or method calls
-
Case distinctions, for example, via if
-
Loops for repetitions, for example, using for or do- while
[»] Note
The imperative ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access