
chapter starts looking at the basic syntax or grammar of the Java language. We
use an example program to illustrate language basics such as variables, Java keywords, data
types, and arithmetic operations. We suspend discussion of objects until Chapter 4 although
we do cover strings and arrays in this chapter. We continue with the basic syntax in Chapter 3,
where we discuss topics related to program flow control.
Throughout this chapter, we use an example application, Circle, which calculates the
area of a circle. The radius is input as a parameter to the program.
Circle
1 /*
2 This application reads in a radius ...