Image Chapter 1 Self Test

1. What is bytecode and why is it important to Java’s use for Internet programming?

2. What are the three main principles of object-oriented programming?

3. Where do Java programs begin execution?

4. What is a variable?

5. Which of the following variable names is invalid?

A. count

B. $count

C. count27

D. 67count

6. How do you create a single-line comment? How do you create a multiline comment?

7. Show the general form of the if statement. Show the general form of the for loop.

8. How do you create a block of code?

9. The moon’s gravity is about 17 percent that of earth’s. Write a program that computes your effective weight ...

Get Java, A Beginner's Guide, 5th Edition, 5th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.