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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.