Vous voulez voir cette page en français ? Cliquez ici.

Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

The Java Programming Language [Paperback]

Ken Arnold , James Gosling
4.2 out of 5 stars  See all reviews (33 customer reviews)

Available from these sellers.


Formats

Amazon Price New from Used from
Paperback CDN $64.99  
Paperback, December 1997 --  
There is a newer edition of this item:
The Java Programming Language The Java Programming Language
Sign up to be notified when this item becomes available.
Join Amazon Student in Canada


Book Description

December 1997 0201310066 978-0201310061 2nd Revised edition
Written for programmers who have had experience with object-oriented programming, this book explains the design motivation of JDK 1.1 and 1.2 and the tradeoffs involved in using specific features. The second edition has increased coverage of classes: extending classes, tokens, operators and expressions, I/O utilities, programming with types, native methods, and new packages which are all included with JDK 1.1 and 1.2. .

Customers Who Bought This Item Also Bought


Product Details


Product Description

From Amazon

Written by several of Java's inventors, The Java Programming Language, Third Edition provides a nearly indispensable guide to basic and advanced features in today's hottest programming language. Perfect for the intermediate or advanced developer, this book delivers a wealth of information on how to do more with Java. The first sections of this title provide a nicely compact tour of Java basics. If you're a beginner, you'll get a glimpse of the fundamentals of Java quickly. Most of this new edition has the more experienced reader in mind. Subsequent chapters delve into basic and advanced language features of what can be done with classes, interfaces and other design features in Java. The authors' explanations are notably clear and never pedantic. Many examples are illustrated using simple mathematical problems, and the class design samples for inheritance and interfaces all use comprehensible class names and concepts.

This book is just outstanding when it comes to class design. This title will definitely let any reader do more with classes, whether you want to make use of such features as "anonymous inner classes", reflection (for loading classes dynamically), or do more with interfaces (including extending interfaces, and even tricks to change data members in interfaces).

Standout sections here include a complete guide to Java language statements, including keywords, literals and support for Unicode. Later sections feature a nicely clear explanation of Java's complicated I/O classes, a fine tutorial on threading and a solid introduction to using Java's collection classes. The book closes with a tour of some additional "core" Java packages that are available in the language.

In all, this up-to-the-minute guide to some of the more complex features in today's Java fills a valuable niche for any Java developer. Besides providing a glimpse into what the Java team at Sun is up to, this authoritative resource can help you master the finer points of class design, as well as make the most out of newly added features in the new JDK 1.3 standard. --Richard Dragan, Amazon.com

Topics covered: Quickstart overview of Java, class and object design in Java, access control, construction and initialisation, static methods, method overloading, class inheritance, redefining members, the protected keyword, the strictfp keyword and floating point processing, cloning objects, interfaces (constants, methods and modifiers), extending interfaces, marker interfaces, nested classes and interfaces (including static nested types, inner classes and anonymous inner classes), tokens, operators and expressions in Java, literals, keywords, operator precedence, control flow, Java exception handling, exception classes, the String and StringBuffer classes, threads, synchronisation APIs and techniques (scheduling, thread groups and thread local storage), the wrapper classes for Number types, Java reflection, loading classes, garbage collection (GC algorithms, finalisation and reachability states), packages, JavaDoc documentation tags, tour of Java I/O stream classes, serialisation techniques, new and legacy Java collections, misc. utility classes, system programming with properties, processes and JVM shutdown; internationalisation and localisation techniques, and tour of additional Java core packages. --This text refers to an out of print or unavailable edition of this title.

From the Inside Flap

Preface

Beautiful buildings are more than scientific. They are true organisms, spiritually conceived; works of art, using the best technology by inspiration rather than the idiosyncrasies of mere taste or any averaging by the committee mind.

-Frank Lloyd Wright

THE Java programming language (hereafter called simply Java) has been warmly received by the world community of software developers and Internet content providers. Users of the Internet and World Wide Web benefit from access to secure, platform-independent applications that can come from anywhere on the Internet. Software developers who create applications in Java benefit by develop- ing code only once, with no need to "port" their applications to every software and hardware platform.

For many, Java was known first as a tool to create applets for the World Wide Web. Applet is the term Java uses for a mini-application that runs inside a web page. An applet can perform tasks and interact with users on their browser pages without using resources from the Web server after being downloaded. Some applets may, of course, interact with the server for their own purposes, but that's their business.

Java is indeed valuable for distributed network environments like the Web. However, Java goes well beyond this domain to provide a powerful general-pur- pose programming language suitable for building a variety of applications that either do not depend on network features, or want them for different reasons. Java's ability to execute downloaded code on remote hosts in a secure manner is a critical requirement for many organizations.

Other groups use Java as a general-purpose programming language for projects in which machine independence is less important. Java's ease of pro- gramming and safety features help you quickly produce working code. Some common programming errors never occur because of features like garbage collec- tion and type-safe references. Java's support for multithreading caters to modern network-based and graphical user interface-based applications that must attend to multiple tasks simultaneously, and the mechanisms of exception handling ease the task of dealing with error conditions. While its built-in tools are powerful, the Java language is a simple language in which programmers can quickly become profi- cient.

Java is designed for maximum portability with as few implementation depen- dencies as possible. An int, for example, is a 32-bit signed two's-complement integer in all Java implementations, irrespective of the CPU architecture on which the Java program executes. Defining everything possible about the language and its runtime environment enables users to run compiled code anywhere and share code with anyone who has a Java environment.

About This Book

This book teaches Java programming to people who are familiar with basic pro- gramming concepts. It explains Java without being arduously formal or complete. This book is not an introduction to object-oriented programming, although some issues are covered to establish a common terminology. Other books in this series, and much online documentation, focus on Java applets, databases, components, and other specific kinds of programming tasks. For other references, see "Further Reading" on page 381.

This second edition includes the changes introduced in Java 1.1, such as nested classes (including anonymous classes), threading issues, character-based streams, object serialization, documentation comments, new utility classes, and internationalization/localization. You will also find brief coverage of the other core Java packages. If you have already read the first edition, this edition will give you new information, but since most of the language is unchanged, and almost all core packages types are still usable, you will want to pay most attention to the newer areas. The first chapter (the "quick tour") is largely unchanged because it covers the elemental parts of Java, which have changed little.

Java shares many language features common to most programming languages in use today. Java should look familiar to C and C++ programmers, because Java was designed with C and C++ constructs where the languages are similar. That said, this book is neither a comparative analysis nor a "bridge" tutorial-no knowledge of C or C++ is assumed. C++ programmers, especially, may be as hin- dered by what they must unlearn as they are helped by their knowledge.

Chapter 1-A Quick Tour of Java-gives a quick overview of Java. Program- mers who are unfamiliar with object-oriented programming notions should read the quick tour, while programmers who are already familiar with object-oriented programming paradigms will find the quick tour a useful introduction to the object-oriented features of Java.

Chapters 2, 3, and 4 cover the object-oriented core features of Java, namely, class declarations that define components of a program, and objects manufactured according to class definitions. Chapter 2-Classes and Objects-describes the basis of the Java language: classes. Chapter 3-Extending Classes-describes how an existing class can be extended, or subclassed, to create a new class with additional data and behavior. Chapter 4-Interfaces-describes how to declare interface types which are abstract descriptions of behavior that provide maximum flexibility for class designers and implementers.

Chapters 5 and 6 cover standard constructs common to most languages. Chap- ter 5-Tokens, Operators, and Expressions-describes the tokens of the language from which statements are constructed, how the tokens and operators are used to build expressions, and how expressions are evaluated. Chapter 6-Control Flow-describes how control statements direct the order of statement execution.

Chapter 7-Exceptions-describes Java's powerful error-handling capabili- ties. Chapter 8-Strings-describes the built-in language and runtime support for String objects.

Chapter 9-Threads-explains Java's implementation of multithreading. Many applications, such as graphical interface-based software, must attend to multiple tasks simultaneously. These tasks must cooperate to behave correctly, and threads meet the needs of cooperative multitasking.

Chapter 10-Packages-describes Java's mechanism for grouping collections of Java classes into separate packages. Chapter 11-Documentation Comments- shows how to write reference documentation in comments.

Chapters 12 through 15 cover the main body of the core Java class library packages. Chapter 12-The I/O Package-describes the Java input/output system, which is based on streams. Chapter 13-Standard Utilities-covers Java utility classes such as vectors and hashtables. Chapter 14-Programming with Types- describes Java's type-related classes: individual objects that describe each class and interface, and classes that wrap primitive data types such as integers and float- ing-point values into their own object types. Chapter 15-System Programming- leads you through the system classes that provide access to features of the under- lying platform.

Chapter 16- Internationalization and Localization-covers some of the tools used to create programs that can run in many linguistic and cultural environ- ments. Chapter 17-Standard Packages-briefly explores the packages that are part of the Java platform, giving overviews of those packages not covered in more detail in this book.

Appendix A-Runtime Exceptions-lists all the runtime exceptions and errors that the Java system itself can throw.

Appendix B-Useful Tables-has tables of information that you may find useful for quick reference.

Finally, Further Reading lists works that may be interesting for further read- ing on Java details, object orientation, programming with threads, software design, and other topics.

Examples and Documentation

All the code examples in the text have been compiled and run on the latest version of the language available at the time the book was written, which was version 1.1.4. Only Java 1.14 features are covered-deprecated types, methods, and fields are ignored except where unavoidable. We have also covered issues beyond writ- ing programs that simply compile. Part of learning a language is to learn to use it well. For this reason, we have tried to show principles of good programming style and design.

In a few places we refer to online documentation. Java development environ- ments provide a way to automatically generate documentation (usually HTML documents) from a compiled class using the documentation comments. This docu- mentation is normally viewed using a Web browser.

Acknowledgments (First Edition)

No technical book-writing endeavor is an island unto itself, and ours was more like a continent. Many people contributed technical help, excellent reviews, useful information, and book-writing advice.

Contributing Editor Henry McGilton of Trilithon Software played the role of "Chief Editorial Firefighter" to help make this book possible. Series Editor Lisa Friendly contributed dogged perseverance and support.

A veritable multitude of reviewers took time out of their otherwise busy lives to read, edit, advise, revise, and delete material, all in the name of making this a better book. Kevin Coyle performed one of the most detailed editorial reviews at all levels. Karen Bennet, Mike Burati, Patricia Giencke, Steve Gilliard, Bill Joy, Rosanna Lee, Jon Madison, Brian O'Neill, Sue Palmer, Stephen Perelgut, R. Anders Schneiderman, Susan Sim, Bob Sproull, Guy Steele, Arthur van Hoff, Jim Waldo, Greg Wilson, and Ann Wollrath provided in-depth review. Geoff Arnold, Tom Cargill, Chris Darke, Pat Finnegan, Mick Jordan, Doug Lea, Randall Murray, Roger Riggs, Jimmy Torres, Arthur van Hoff, and Frank Yellin contributed useful comments and technical information at critical junctures.

Alka Deshpande, Sharon Flank, Nassim Fotouhi, Betsy Halstead, Kee Hinck- ley, Dr. K. Kalyanasundaram, Patrick Martin, Paul Romagna, Susan Snyder, and Nicole Yankelovich collaborated to make possible the five words of non-ISO- Latin-1 text on pages 106 and 260. Jim Arnold provided research help on the proper spelling, usage, and etymology of "smoog" and "moorge." Ed Mooney helped with the document preparation. Herb and Joy Kaiser were our Croatian language consultants. Cookie Callahan, Robert E. Pierce, and Rita Tavilla pro- vided the support necessary to keep this project going at many moments when it would otherwise have stalled with a sputtering whimper.

Thanks to Kim Polese for supplying us the capsule summary of why Java is important to computer users as well as programmers.

Support and advice were provided at critical moments by Susan Jones, Bob Sproull, Jim Waldo, and Ann Wollrath. And we thank our families, who, besides their loving support, would at times drag us out to play when we should have been working, for which we are deeply grateful.

And thanks to the folks at Peet's Coffee and Tea, who kept us buzzed on the best Java on the planet.

Acknowledgments (Second Edition)

The cast of characters for this second edition is much like the first.

Series Editor Lisa Friendly continued to be doggedly supportive and attentive.

The set of reviewers was smaller, overlapping, and certainly as helpful and thorough. Overall reviews by Steve Byrne, Tom Cargill, Mary Dageforde, Tim Lindholm, and Rob Murray were critical to clarity. Brian Beck, Peter Jones, Doug Lea, Bryan O'Sullivan, Rosanna Lee, Lori Park, Mark Reinhold, Roger Riggs, Ann Wollrath, and Ken Zadek contributed focused reviews of important parts. Guy Steele's support was ongoing, and warm. Rosemary Simpson's extensive and intensive efforts to make a useful index are deeply appreciated. Carla Carlson gave critical logistic support that kept all the wheels on the tracks instead of in the ditch. All who submitted errata and suggestions from the first edition were help- ful.

For some inexplicable reason we left the friendly folks of Addison-Wesley off the original acknowledgments-luckily, most of them were present again for this edition. A merged list for both editions includes Kate Duffy, Rosa Gonzales, Mike Hendrickson, Marina Lang, Shannon Patti, Marty Rabinowitz, Sarah Weaver, and Pamela Yee. Others did much that we are blissfully unaware of, but for which we are nonetheless abidingly grateful.

Gerry Wiener provided the Tibetan word on page 260, and we also had help on this from Craig Preston and Takao Miyatani.

And Peet's Coffee and Tea continued its supporting role as purveyor to the caffeine-consuming connoisseur.

Any errors or shortcomings that remain in this book-despite the combined efforts of these myriads-are completely the responsibility of the authors.

Results! Why, man, I have gotten a lot of results. I know several thousand things that won't work.

-Thomas Edison

0201310066P04062001


Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Reviews

Most helpful customer reviews
By Robert
Format:Paperback
I'm disappointed with many of the low rated comments, this book is not for beginners, its an intermediate to advanced text. When you read the description it states: "Most of this new edition has the more experienced reader in mind".
I started out with this book in college, it was assigned reading and I hated it, I had to read each page twice. But as I got more proficient with java and wanted to learn all the fine points, I couldn't find another book out there that delves into the core of the language as well as this book does. Most java books out there spend half the book discussing swing and the api classes, but this book discusses the language itself. If you're a software engineer especially, the most difficultly you'll have is debugging complicated code, you'll need to have a good understanding of how java works under the hood.
This book was invaluable to me at work, because I didn't really understand why certain variables weren't getting updated, until I read that unless you specify them as volatile, a class will keep a cached copy of them. I had problems with the order of initialization of certain variables in a subclass, and then I read that top most super class gets instantiated first, then its subclass, on down the line, fields first, then the constructor guts.
You can assume that any book written by the creator(s) of a language wont be introductory, but will give you an in depth look at the finer points of the language that other, more cursory books, gloss over.
Was this review helpful to you?
4.0 out of 5 stars Excellent conceptual overview of Java Dec 25 2001
Format:Paperback
This book provides an excellent overview of the motivation behind Java as a language. This is NOT a tutorial, nor light reading for the inexperienced programmer. However, if you are migrating from another language or want to become a proficient Java programmer, then this is the book for you.
This book is not a language reference. Syntax and semantics are loosely defined, with much more emphasis placed on how specific constructs and library features fit into the greater "Java philosophy".
The authors of this book have obviously divided their work by chapters, since each chapter varies in quality, phrasing, grammar and even spelling quality. I find these errors annoying, but they don't get in the way of the information flow.
The chapters are generally well-written, if a little long and tiresome in its details (see the chapter on nested and inner classes). But perplexingly, the chapters on thread synchronization and object serialization give scant details of the "gotchas" associated with those topics.
Be advised that this book does not cover the Java library in great detail, nor does it deal with any platform-specific issues.
This is a book that deserves a place on the bookshelf of any serious Java developer.
Was this review helpful to you?
2.0 out of 5 stars boring Nov. 27 2001
Format:Paperback
First, disclosure: I'm truly a nobody as Java programmers go. I'm one of those accidental programmers who started learning Perl one day a few years ago, in order to do some CGI programming. But I have been studying Java in a course and have bought a couple books including this one. I've studied and used Perl, PHP, JavaScript, a little Python, and own plenty of computer books, especially O'Reilly titles.
Normally I don't dare bash books whose authors are a 9.9 on a knowledge scale of 1 to 10, when I'm about a 1.7. But in this case I make an exception because the way this book is written is mind-numbing, turgid, impenetrable, and boring. They've taken an inherently fascinating subject and made it dull -- kind of like taking perfectly good pizza and dumping salt all over it. Books about computer programming languages should have at least few good laughs in them, and be interesting enough to keep you up at night rather than make you nod off. Perhaps if you're a genius and/or already very well versed in Java, you'll enjoy it and find it useful. Otherwise, go for Just Java 2.
Was this review helpful to you?
5.0 out of 5 stars Indispensable, and excellent in every way July 20 2001
Format:Paperback
In an earlier review, I recommended this as a reference, and suggested using the Core Java books as a tutorial.
I would like to expand on that earlier review now. I got my feet wet and did a lot of Java coding with what I picked up from the other books, and now I find myself with a free week or so to learn more about Java, and much to my surprise I discover that this book is probably one of the best self-instruction books I have ever seen.
I would single out the exercises as excellently conceived. My first reaction was "Oh, those exercises are childishly easy." Wrong! Work your way through this book slowly and carefully, and do all the exercises, and you will learn just about everything there is to know about Java (the language, not Java the libraries and the zillion APIs). A particular excellence of the exercises is that the instructions are very short, but frequently following these instructions turns up unexpected complications which just further reinforce the reading matter in the text.
This may be the best programming book ever written.
Highly recommended!
Was this review helpful to you?
3.0 out of 5 stars Concise semantics, but very conceptual April 17 2001
Format:Paperback
As an experienced C++ programmer, I'm happy I picked up this book for the Java language semantics (the syntax and keywords and stuff). It has proved very useful for translating what I know how to do in C++ to Java, but the wording is often difficult to understand. Whereas books that taught me how to do things in C++ were written for an audience migrating from a top-down, procedural coding style (aka Pascal or C), - logically wrapping functions and variables together into C++ classes - this book teaches one how to design from a purely object-oriented approach. In other words, a book on OO design is almost required reading in order to understand this. To the author's credit, he is very good at describing how to tie everything together semantically given the incredible flexibility of the Java language. I had to look to examples outside of this book for the fundamental class design of a simple GUI. That's not that bad really, as the online Java Tutorial complements this book very well with the old AWT and the new SWING trails.
All in all, very comprehensive! Doesn't have much detail on the AWT or SWING Java packages and won't teach you how to design a simple GUI application. Otherwise, excellent.
Was this review helpful to you?
Want to see more reviews on this item?
Most recent customer reviews
5.0 out of 5 stars Good for experienced user, not for beginners
This is the best book by far to explain Java itself, concise and clear cut, but don't expect to get much out of it if you haven't done any Java coding or are just getting started. Read more
Published on May 13 2004 by J. YU
5.0 out of 5 stars The best general book about the Java language.
As many of the other reviewers have noted, this is a good book for those coming from programming in another language such as C++. Read more
Published on Feb. 2 2004 by Eric Crampton
5.0 out of 5 stars Solid, well written Introduction
As opposed to a number of other introductory books for Java, this one doesn't cater to "Dummies", but to competent programmers who want to pick up another programming... Read more
Published on Aug. 14 2003 by Amazon Customer
5.0 out of 5 stars C++'s equivalent of "The C++ Programming Language"
I am a hardcore C++ devotee that has recently fallen into a Java/J2EE project. I wanted to come up to speed quickly on more than just the syntax of the Java language. Read more
Published on Dec 15 2002 by Reed Mangino
5.0 out of 5 stars this book is the java language reference
many reviewers seem to have the misconception that, somehow, this is a tutorial, a teach yourself java book. Read more
Published on July 18 2002 by Statistician
4.0 out of 5 stars Dull but functional
A dull book for a dull language. It's hard to make a language like Java exciting, and the authors of this book didn't try. Read more
Published on May 22 2002 by Avdi Grimm
5.0 out of 5 stars Great Book for ABSOLUTE beginners
I have bought about $500 worth of Java programming books in the last 6 months. I have some programming background and found this to be the absolute BEST BET for anyone wanting to... Read more
Published on Feb. 15 2002 by Joe Braun
5.0 out of 5 stars Great book on learning java
Great intro to java. If you read the book carefully and do the programming tasks, you will get a great understanding of java. Read more
Published on Jan. 14 2002 by S. Wain
2.0 out of 5 stars boring
First, disclosure: I'm truly a nobody as Java programmers go. I'm one of those accidental programmers who started learning Perl one day a few years ago, in order to do some CGI... Read more
Published on Nov. 27 2001 by David Mintz
Search Customer Reviews
Only search this product's reviews

Look for similar items by category


Feedback