APCSA1 Fundamental Java CH 02 WSSummer 2022
APCSA1 Fundamental Java CH 02 WSSummer 2022
EXERCISE 2.1
2. Describe two features of Java that make it a better language than C++.
EXERCISE 2.2
2. What is byte code? Describe how the JVM uses byte code.
1
Fundamentals of Java Chapter 2: First Java Programs
EXERCISE 2.4
4. Write a sequence of statements to display your name, address, and phone number
in the terminal window.
Here is an example answer, which is entirely fictional:
2
Fundamentals of Java Chapter 2: First Java Programs
EXERCISE 2.5
EXERCISE 2.6
3
Fundamentals of Java Chapter 2: First Java Programs
4. Explain the difference between a variable of type double and a variable of type
Scanner.
5. Describe the difference between print and println, and give an appropriate
example of the use of each.
REVIEW QUESTIONS
1. List three reasons why Java is an important programming language.
4
Fundamentals of Java Chapter 2: First Java Programs
4. List two objects that are used for terminal input and output in Java programs.
5
Fundamentals of Java Chapter 2: First Java Programs
4. A(n) ______________ names a place where data can be stored in a Java program