Java 2: The Complete Reference, Fifth Edition


This book is the most complete and up-to-date resource on Java from programming guru, Herb Schildt — a must-have desk reference for every Java programmer.

World-renowned programming author Herb Schildt brings you a fully updated, comprehensive resource on Java 2. This is the one book no Java programmer should be without.

Read More Show Less
... See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (18) from $1.99   
  • New (2) from $105.00   
  • Used (16) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2014

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2014

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


This book is the most complete and up-to-date resource on Java from programming guru, Herb Schildt — a must-have desk reference for every Java programmer.

World-renowned programming author Herb Schildt brings you a fully updated, comprehensive resource on Java 2. This is the one book no Java programmer should be without.

Read More Show Less

Editorial Reviews

From The Critics
This fifth edition of a guide to the Java language covers the latest features of Java 2, v1.4, including the new I/O API, regular expression, chained exceptions, the assert keyword, and upgrades to Java's networking classes and the Collections Framework. The book starts with an in-depth tutorial of the Java language, then examines the standard Java library and issues related to the Java development environment, and presents Java applets. Schildt has written many previous books on Java and other computer topics. Annotation c. Book News, Inc., Portland, OR
Read More Show Less

Product Details

  • ISBN-13: 9780072224207
  • Publisher: McGraw-Hill Companies, The
  • Publication date: 7/1/2002
  • Series: Osborne Complete Reference Series
  • Edition description: Older Edition
  • Edition number: 5
  • Pages: 1184
  • Product dimensions: 7.42 (w) x 9.12 (h) x 2.36 (d)

Meet the Author

Herbert Schildt is the world's leading programming author with more than 3 million books sold. He is the author of Java 2: A Beginners Guide, Java 2 Programmer's Reference, C++: The Complete Reference, and many, many others.
Read More Show Less

Read an Excerpt

Chapter 1: The Genesis of Java

When the chronicle of computer languages is written, the following will be said: B led to C, C evolved into C++, and C++ set the stage for Java. To understand Java is to understand the reasons that drove its creation, the forces that shaped it, and the legacy that it inherits. Like the successful computer languages that came before, Java is a blend of the best elements of its rich heritage combined with the innovative concepts required by its unique environment. While the remaining chapters of this book describe the practical aspects of Java-including its syntax, libraries, and applications-in this chapter, you will learn how and why Java came about, and what makes it so important.

although Java has become inseparably linked with the online environment of the Internet, it is important to remember that Java is first and foremost a programming language. Computer language innovation and development occurs for two fundamental reasons:

  • To adapt to changing environments and uses
  • To implement refinements and improvements in the art of programming
as you will see, the creation of Java was driven by both elements in nearly equal measure.

Java's Lineage Java is related to C++, which is a direct descendent of C. Much of the character of Java is inherited from these two languages. From C, Java derives its syntax. Many of Java's object-oriented features were influenced by C++. In fact, several of Java's defining characteristics come from-or are responses to-its predecessors. Moreover, the creation of Java was deeply rooted in the process of refinement and adaptation that has been occurring in computer programming languages for thepast three decades. For these reasons, this section reviews the sequence of events and forces that led up to Java. as you will see, each innovation in language design was driven by the need to solve a fundamental problem that the preceding languages could not solve. Java is no exception.

The Birth of Modern Programming: C The C language shook the computer world. Its impact should not be underestimated, because it fundamentally changed the way programming was approached and thought about. The creation of C was a direct result of the need for a structured, efficient, high-level language that could replace assembly code when creating systems programs. as you probably know, when a computer language is designed, trade-offs are often made, such as the following:

  • Ease-of-use versus power
  • Safety versus efficiency
  • Rigidity versus extensibility
Prior to C, programmers usually had to choose between languages that optimized one set of traits or the other. For example, although FORTRaN could be used to write fairly efficient programs for scientific applications, it was not very good for systems code. and while BaSIC was easy to learn, it wasn't very powerful, and its lack of structure made its usefulness questionable for large programs. assembly language can be used to produce highly efficient programs, but it is not easy to learn or use effectively. Further, debugging assembly code can be quite difficult. another compounding problem was that early computer languages such as BaSIC, COBOL, and FORTRaN were not designed around structured principles. Instead, they relied upon the GOTO as a primary means of program control. as a result, programs written using these languages tended to produce "spaghetti code"-a mass of tangled jumps and conditional branches that make a program virtually impossible to understand. While languages like Pascal are structured, they were not designed for efficiency, and failed to include certain features necessary to make them applicable to a wide range of programs. (Specifically, given the standard dialects of Pascal available at the time, it was not practical to consider using Pascal for systems-level code.) So, just prior to the invention of C, no one language had reconciled the conflicting attributes that had dogged earlier efforts. Yet the need for such a language was pressing. By the early 1970s, the computer revolution was beginning to take hold, and the demand for software was rapidly outpacing programmers' ability to produce it. a great deal of effort was being expended in academic circles in an attempt to create a better computer language. But, and perhaps most importantly, a secondary force was beginning to be felt. Computer hardware was finally becoming common enough that a critical mass was being reached. No longer were computers kept behind locked doors. For the first time, programmers were gaining virtually unlimited access to their machines. This allowed the freedom to experiment. It also allowed programmers to begin to create their own tools. On the eve of C's creation, the stage was set for a quantum leap forward in computer languages.

Invented and first implemented by Dennis Ritchie on a DEC PDP-11 running the UNIX operating system, C was the result of a development process that started with an older language called BCPL, developed by Martin Richards. BCPL influenced a language called B, invented by Ken Thompson, which led to the development of C in the 1970s. For many years, the de facto standard for C was the one supplied with the UNIX operating system and described in The C Programming Language by Brian Kernighan and Dennis Ritchie (Prentice-Hall, 1978). C was formally standardized in December 1989, when the american National Standards Institute (aNSI) standard for C was adopted.

The creation of C is considered by many to have marked the beginning of the modern age of computer languages. It successfully synthesized the conflicting attributes that had so troubled earlier languages. The result was a powerful, efficient, structured language that was relatively easy to learn. It also included one other, nearly intangible aspect: it was a programmer's language...

Read More Show Less

Table of Contents

1 The Genesis of Java 3
2 An Overview of Java 17
3 Data Types, Variables, and Arrays 41
4 Operators 73
5 Control Statements 99
6 Introducing Classes 129
7 A Closer Look at Methods and Classes 155
8 Inheritance 189
9 Packages and Interfaces 223
10 Exception Handling 249
11 Multithreaded Programming 273
12 I/O, Applets, and Other Topics 313
13 String Handling 347
14 Exploring java.lang 379
15 java.util Part 1: The Collections Framework 439
16 java.util Part 2: More Utility Classes 505
17 Input/Output: Exploring 537
18 Networking 587
19 The Applet Class 627
20 Event Handling 653
21 Introducing the AWT: Working with Windows, Graphics, and Text 687
22 Using AWT Controls, Layout Managers, and Menus 735
23 Images 799
24 New I/O, Regular Expressions, and Other Packages 843
25 Java Beans 885
26 A Tour of Swing 921
27 Servlets 949
28 Migrating from C++ to Java 981
29 The DynamicBillboard Applet 1011
30 ImageMenu: An Image-Based Web Menu 1047
31 The Lavatron Applet: A Sports Arena Display 1057
32 Scrabblet: A Multiplayer Word Game 1069
A Using Java's Documentation Comments 1133
Index 1141
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)