Book description
Direct from the creators of the Java™ programming language, the completely revised fourth edition of The Java™ Programming Language is an indispensable resource for novice and advanced programmers alike.
Developers around the world have used previous editions to quickly gain a deep understanding of the Java programming language, its design goals, and how to use it most effectively in real-world development. Now, Ken Arnold, James Gosling, and David Holmes have updated this classic to reflect the major enhancements in Java™ 2 Standard Edition 5.0 (J2SE™ 5.0).
The authors systematically cover most classes in Java’s main packages, java.lang.*, java.util, and java.io, presenting in-depth explanations of why these classes work as they do, with informative examples. Several new chapters and major sections have been added, and every chapter has been updated to reflect today’s best practices for building robust, efficient, and maintainable Java software.
Key changes in this edition include
New chapters on generics, enums, and annotations, the most powerful new language features introduced in J2SE 5.0
Changes to classes and methods throughout to reflect the addition of generics
Major new sections on assertions and regular expressions
Coverage of all the new language features, from autoboxing and variable argument methods to the enhanced for-loop and covariant return types
Coverage of key new classes, such as Formatter and Scanner
The Java™ Programming Language, Fourth Edition, is the definitive tutorial introduction to the Java language and essential libraries and an indispensable reference for all programmers, including those with extensive experience. It brings together insights you can only get from the creators of Java: insights that will help you write software of exceptional quality.
Table of contents
- Copyright
- The Java™ Series
- Preface
-
1. A Quick Tour
- 1.1. Getting Started
- 1.2. Variables
- 1.3. Comments in Code
- 1.4. Named Constants
- 1.5. Unicode Characters
- 1.6. Flow of Control
- 1.7. Classes and Objects
- 1.8. Methods and Parameters
- 1.9. Arrays
- 1.10. String Objects
- 1.11. Extending a Class
- 1.12. Interfaces
- 1.13. Generic Types
- 1.14. Exceptions
- 1.15. Annotations
- 1.16. Packages
- 1.17. The Java Platform
- 1.18. Other Topics Briefly Noted
- 2. Classes and Objects
-
3. Extending Classes
- 3.1. An Extended Class
- 3.2. Constructors in Extended Classes
- 3.3. Inheriting and Redefining Members
- 3.4. Type Compatibility and Conversion
- 3.5. What protected Really Means
- 3.6. Marking Methods and Classes final
- 3.7. Abstract Classes and Methods
- 3.8. The Object Class
- 3.9. Cloning Objects
- 3.10. Extending Classes: How and When
- 3.11. Designing a Class to Be Extended
- 3.12. Single Inheritance versus Multiple Inheritance
- 4. Interfaces
- 5. Nested Classes and Interfaces
- 6. Enumeration Types
- 7. Tokens, Values, and Variables
- 8. Primitives as Types
- 9. Operators and Expressions
- 10. Control Flow
- 11. Generic Types
- 12. Exceptions and Assertions
- 13. Strings and Regular Expressions
-
14. Threads
- 14.1. Creating Threads
- 14.2. Using Runnable
- 14.3. Synchronization
- 14.4. wait, notifyAll, and notify
- 14.5. Details of Waiting and Notification
- 14.6. Thread Scheduling
- 14.7. Deadlocks
- 14.8. Ending Thread Execution
- 14.9. Ending Application Execution
- 14.10. The Memory Model: Synchronization and volatile
- 14.11. Thread Management, Security, and ThreadGroup
- 14.12. Threads and Exceptions
- 14.13. ThreadLocal Variables
- 14.14. Debugging Threads
- 15. Annotations
-
16. Reflection
- 16.1. The Class Class
- 16.2. Annotation Queries
- 16.3. The Modifier Class
- 16.4. The Member classes
- 16.5. Access Checking and AccessibleObject
- 16.6. The Field Class
- 16.7. The Method Class
- 16.8. Creating New Objects and the Constructor Class
- 16.9. Generic Type Inspection
- 16.10. Arrays
- 16.11. Packages
- 16.12. The Proxy Class
- 16.13. Loading Classes
- 16.14. Controlling Assertions at Runtime
- 17. Garbage Collection and Memory
- 18. Packages
- 19. Documentation Comments
-
20. The I/O Package
- 20.1. Streams Overview
- 20.2. Byte Streams
- 20.3. Character Streams
- 20.4. InputStreamReader and OutputStreamWriter
-
20.5. A Quick Tour of the Stream Classes
- 20.5.1. Synchronization and Concurrency
- 20.5.2. Filter Streams
- 20.5.3. Buffered Streams
- 20.5.4. Piped Streams
- 20.5.5. ByteArray Byte Streams
- 20.5.6. CharArray Character Streams
- 20.5.7. String Character Streams
- 20.5.8. Print Streams
- 20.5.9. LineNumberReader
- 20.5.10. SequenceInputStream
- 20.5.11. Pushback Streams
- 20.5.12. StreamTokenizer
- 20.6. The Data Byte Streams
- 20.7. Working with Files
- 20.8. Object Serialization
- 20.9. The IOException Classes
- 20.10. A Taste of New I/O
-
21. Collections
- 21.1. Collections
- 21.2. Iteration
- 21.3. Ordering with Comparable and Comparator
- 21.4. The Collection Interface
- 21.5. Set and SortedSet
- 21.6. List
- 21.7. Queue
- 21.8. Map and SortedMap
- 21.9. enum Collections
- 21.10. Wrapped Collections and the Collections Class
- 21.11. Synchronized Wrappers and Concurrent Collections
- 21.12. The Arrays Utility Class
- 21.13. Writing Iterator Implementations
- 21.14. Writing Collection Implementations
- 21.15. The Legacy Collection Types
- 21.16. Properties
- 22. Miscellaneous Utilities
- 23. System Programming
- 24. Internationalization and Localization
-
25. Standard Packages
- 25.1. java.awt — The Abstract Window Toolkit
- 25.2. java.applet — Applets
- 25.3. java.beans — Components
- 25.4. java.math — Mathematics
- 25.5. java.net — The Network
- 25.6. java.rmi — Remote Method Invocation
- 25.7. java.security and Related Packages — Security Tools
- 25.8. java.sql — Relational Database Access
- 25.9. Utility Subpackages
- 25.10. javax.* — Standard Extensions
- 25.11. javax.accessibility — Accessibility for GUIs
- 25.12. javax.naming — Directory and Naming Services
- 25.13. javax.sound — Sound Manipulation
- 25.14. javax.swing — Swing GUI Components
- 25.15. org.omg.CORBA — CORBA APIs
- A. Application Evolution
- B. Useful Tables
- Further Reading
- Colophon
- Article
- Exercises
- Quotes
Product information
- Title: THE Java™ Programming Language, Fourth Edition
- Author(s):
- Release date: August 2005
- Publisher(s): Addison-Wesley Professional
- ISBN: 0321349806
You might also like
book
The C++ Programming Language, 4th Edition
The new C++11 standard allows programmers to express ideas more clearly, simply, and directly, and to …
book
The Go Programming Language
is the authoritative resource for any programmer who wants to learn Go. It shows how to …
book
C Programming Language, 2nd Edition
This book is meant to help the reader learn how to program in C. It is …
book
A Tour of C++, 2nd Edition
In Bjarne Stroustrup, the creator of C++, describes what constitutes modern C++. This concise, self-contained guide …