This book is about the Java(TM) language and programming environment. If you've been at all active on the Internet in the past few years, you've heard a lot about Java. It's one of the most exciting developments in the history of the Internet, rivaling the creation of the World Wide Web. Java became the darling of the Internet programming community as soon as the alpha version was released. Immediately, thousands of people were writing Java applets to add to their Web pages. Interest in Java only grew with time, and support for Java in Netscape Navigator guaranteed it would be a permanent part of the Net scene.
What, then, is Java? Java is a language for network programming that was developed by Sun Microsystems. It's already in widespread use for creating animated and interactive Web pages. However, this is only the start. The Java language and environment are rich enough to support entirely new kinds of applications, like dynamically extensible browsers and mobile agents. There are entirely new kinds of computer platforms being developed around Java (handheld devices and network computers) that download all their software over the network. In the coming years, we'll see what Java is capable of doing; fancy Web pages are fun and interesting, but they certainly aren't the end of the story. If Java is successful (and that isn't a foregone conclusion), it could change the way we think about computing in fundamental ways.
This book sets out to give you a head start on a lot of Java fundamentals. Exploring Java attempts to live up to its name by mapping out the Java language, its class libraries, programming techniques, and idioms. We'll dig deep into interesting areas, and at least scratch the surface of the rest. Other titles in the O'Reilly & Associates Java Series will pick up where we leave off and provide more comprehensive information on specific areas and applications of Java.
Whenever possible, we'll provide meaningful, realistic examples and avoid cataloging features. The examples are simple but hint at what can be done. We won't be developing the next great "killer Internet app" in these pages, but we hope to give you a starting point for many hours of experimentation and tinkering that will lead you to learn more on your own.
A lot has happened in the year since the first edition of this book. We're now up to release 1.1.3 of Java, which has many more features than the 1.0 release. Java 1.1 adds many, many new features, in addition to many extensions, to the features of Java 1.0. It's clear that Java is changing the way we think about computing in fundamental ways; we don't regret that prophecy at all. It's becoming more and more clear as time goes on that Java is central to the way software will be written in the future.
This second edition of Exploring Java tries to give you the flavor of Java 1.1. We have uncompromisingly rooted out all deprecated features from Java 1.0 in favor of the newer ways of doing things. For example, the chapters covering AWT all use the new Java 1.1 event model; we will mention the 1.0 event model only to describe the motivation for the new model and to illustrate some differences. The current tools are far superior to the old ones; we see no need for nostalgia.
There is a great deal of new material in this edition of the book. We have rearranged things a bit, adding seven new chapters. The new material expands coverage from the first edition and adds many completely new topics like Java Beans, RMI, and the new AWT event model. Java is growing by leaps and bounds; but as much as we want to cover it all, we have tried to keep this book to a size that's managable and readable.