In this first chapter from the book The Art of Java by Herbert Schildt and James Holmes, the authors highlight certain features of the Java programming language that separate it from other languages. The chapter also covers: memory management, Java's built-in support for multithreading, Java's approach to exceptions as compared to C++, Java's support of polymorphism, and how bytecode enables Java's "Write Once, Run Anywhere" ability and provides security. (ISBN 0-07-222971-3, McGraw-Hill/Osborne, 2003).
History in the large view is mirrored on a smaller scale by the history of programming. Just as the first societies sprang from simple beginnings, so too did programming. Just as great civilizations rose, flourished, and declined, so too have programming languages. Yet, throughout the rise and fall of nations, mankind progressed. In similar fashion, as each new language replaced its predecessor, the ongoing refinement of programming proceeded. Throughout history, there have been pivotal events, such as the fall of the Roman Empire, the invasion of Britain in 1066, or the first nuclear explosion, which transformed the world. The same is true for programming languages, albeit on a smaller scale. For example, the invention of FORTRAN changed forever the way that computers would be programmed. Another such pivotal event was the creation of Java.
Java is the milestone that marks the beginning of programming’s Internet age. Designed expressly for creating applications that would run anywhere there was an Internet connection, Java’s “write once, run anywhere” philosophy defined the new programming paradigm. What James Gosling, et al., initially saw as the solution to a relatively small class of problems became a force that defined the programming landscape for the next generation of programmers. Java so fundamentally altered how we thought about programming that the history of computer languages can be divided into two eras: Before Java and After Java.
Programmers in the Before Java world created programs that ran on a stand-alone machine. Programmers in the After Java world create programs for a highly distributed, networked environment. No longer does a programmer think in terms of a single computer. Instead, the network is the computer, and today we programmers think in terms of servers, clients, and hosts.
Although the development of Java was driven by the needs of the Internet, Java is not simply an “Internet language.” Rather, it is a full-featured, general-purpose programming language designed for the modern, networked world. This means that Java is suitable for nearly all types of programming. Although sometimes overshadowed by its networking capabilities, Java also incorporated many innovative features that advanced the art of programming. These innovations still ripple through computing today. For example, several aspects of C# are modeled on elements first mainstreamed by Java.
Throughout this book we will demonstrate the wide-ranging capabilities of Java by applying it to a varied cross section of applications. Some of the applications demonstrate the power of the language, independent of its networking attributes. We call these “pure code” examples because they show the expressiveness of the Java syntax and design philosophy. Others illustrate the ease with which sophisticated networked programs can be developed using the Java language and its API classes. Collectively, the applications show the power and scope of Java.
Before we begin our exploration of Java, we will take some time in this first chapter to point out several of the features that make it a remarkable programming language. These are features that reflect what we call the “genius of Java.”
Remember: this is chapter one of The Art of Java, by Herbert Schildt and James Holmes (McGraw-Hill/Osborne, ISBN 0-07-222971-3, 2003). Check it out at your favorite bookstore today. Buy this book now.