Appendix A. Answers

Answers to Chapter 1

Reviewing It

Reviewing It

A1:

Five features that Java uses to help you write “bug-free” code are the absence of unsafe constructs (such as pointers, operator overloading, destructors, memory deletion, and multiple implementation inheritance), support for arrays with bounds checking, a completely object-oriented language that promotes reusability, no undefined or architecture-dependent constructs (such as types whose sizes vary from platform to platform), and strict type checking.

A2:

Sun's Java compiler requires you to specify a .java file extension to make it harder to compile anything but Java source code. For example, ...

Get Java™ 2 by Example, Second 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.