Appendix A

Answers to Self Tests

image

Chapter 1: Java Fundamentals

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

Bytecode is a highly optimized set of instructions that is executed by the Java Virtual Machine.

Bytecode helps Java achieve both portability and security.

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

Encapsulation, polymorphism, and inheritance.

3. Where do Java programs begin execution?

Java programs begin execution at main( ).

4. What is a variable?

A variable is a named memory location. The contents of a variable can be changed during the execution of a program.

5. Which ...

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

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