Chapter 2. The Java Language

In this chapter, I’ll discuss the Java language, its evolution, and its status after 20 years in the field. As you’ll see, the language has withstood the test of time pretty well.

Primary Java Language Design Goals

Java has a number of design goals that have formed part of the platform since the earliest days.

Backwards Compatibility

The Java platform has always been very concerned with backwards compatibility. This means that code which was written (or even compiled) for an earlier version of the platform must continue to keep working with later releases of the platform.

This principle allows development groups to have a high degree of confidence that an upgrade of their JDK or JRE will not break currently working applications. The platform has been very successful in achieving this and code written for Java 1.0 will still compile 20 years later on a Java 8 installation without modification (in fact, compatibility is even stronger than that, as you’ll see in the next chapter).

Backwards compatibility is a great strength of the Java language and platform, but in order to achieve it some necessary constraints are required. You’ll meet a good example of this presently, and see in detail how it impacted the evolution of the most recent version, Java SE 8.

Easy to Learn and Read

Java’s approach to code is that it should be easy to read, in accordance with the well-known principle that code is read more often than it is written.

Java feels very familiar ...

Get Java: The Legend 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.