February 2017
Beginner
1056 pages
28h 57m
English
Practice Programs can generally be solved with a short program that directly applies the programming principles presented in this chapter.
Obtain a copy of the Java program shown in Listing 1.1 from the Web at the location given in the preface. Name the file FirstProgram.java. Compile the program so that you receive no compiler error messages. Then run the program.
Modify the Java program described in Practice Program 1 so that it adds three numbers instead of two. Compile the program so that you receive no compiler error messages. Then run the program.
The following program has syntax errors that prevents the program from compiling. Find and fix the errors.
import java.util.Scanner;
public class SyntaxError
{
public static ...Read now
Unlock full access