
Section 2.1
The Basic Java Application
A PROGRAM IS A SEQUENCE OF INSTRUCTIONS that a computer can execute to perform
some task. A simple enough idea, but for the computer to make any use of the instructions, they
must be written in a form that the computer can use. This means that programs have to be
written in programming languages. Programming languages differ from ordinary human
languages in being completely unambiguous and very strict about what is and is not allowed in a
program. The rules that determine what is allowed are called the syntax of the language. Syntax
rules specify the basic vocabulary of the language and how programs can be constructed using
things like loops, branches, and subroutines. A syntactically correct program is one that can be
successfully compiled or interpreted; programs that have syntax errors will be rejected
(hopefully with a useful error message that will help you fix the problem).
Introduction to Programming Using Java
