
The Java (TM) Programming Language
By:Â James Gosling, David Holmes, Ken Arnold
Paperback | 1 August 2005 | Edition Number 4
Sorry, we are not able to source the book you are looking for right now.
We did a search for other books with a similar title, however there were no matches. You can try selecting from a similar category, click on the author's name, or use the search box above to find your book.
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 Javas 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 todays 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.
| Preface | p. xxi |
| A Quick Tour | p. 1 |
| Getting Started | p. 1 |
| Variables | p. 3 |
| Comments in Code | p. 6 |
| Named Constants | p. 7 |
| Unicode Characters | p. 8 |
| Flow of Control | p. 9 |
| Classes and Objects | p. 12 |
| Creating Objects | p. 13 |
| Static or Class Fields | p. 14 |
| The Garbage Collector | p. 15 |
| Methods and Parameters | p. 15 |
| Invoking a Method | p. 15 |
| The this Reference | p. 17 |
| Static or Class Methods | p. 17 |
| Arrays | p. 18 |
| String Objects | p. 21 |
| String Conversion and Formatting | p. 23 |
| Extending a Class | p. 24 |
| Invoking Methods of the Superclass | p. 25 |
| The Object Class | p. 26 |
| Type Casting | p. 27 |
| Interfaces | p. 27 |
| Generic Types | p. 29 |
| Exceptions | p. 32 |
| Annotations | p. 35 |
| Package | p. 36 |
| The Java Platform | p. 38 |
| Other Topics Briefly Noted | p. 39 |
| Classes and Objects | p. 41 |
| A Simple Class | p. 42 |
| Class Members | p. 42 |
| Class Modifiers | p. 43 |
| Fields | p. 44 |
| Field Initialization | p. 44 |
| Static Fields | p. 45 |
| final Fields | p. 46 |
| Access Control | p. 47 |
| Creating Objects | p. 49 |
| Construction and Initialization | p. 50 |
| Constructors | p. 50 |
| Initialization Blocks | p. 54 |
| Static Initialization | p. 55 |
| Methods | p. 56 |
| Static Methods | p. 58 |
| Method Invocations | p. 58 |
| Methods with Variable Numbers of Arguments | p. 60 |
| Method Execution and Return | p. 62 |
| Parameter Values | p. 63 |
| Using Methods to Control Access | p. 65 |
| this | p. 68 |
| Overloading Methods | p. 69 |
| Importing Static Member Names | p. 71 |
| The main Method | p. 73 |
| Native Methods | p. 74 |
| Extending Classes | p. 75 |
| An Extended Class | p. 76 |
| Constructors in Extended Classes | p. 80 |
| Constructor Order Dependencies | p. 81 |
| Inheriting and Redefining Members | p. 84 |
| Overriding | p. 84 |
| Hiding Fields | p. 86 |
| Accessing Inherited Members | p. 86 |
| Accessibility and Overriding | p. 88 |
| Hiding Static Members | p. 89 |
| The super Keyword | p. 89 |
| Type Compatibility and Conversion | p. 90 |
| Compatibility | p. 90 |
| Explicit Type Casting | p. 91 |
| Testing for Type | p. 92 |
| What protected Really Means | p. 93 |
| Marking Methods and Classes final | p. 96 |
| Abstract Classes and Methods | p. 97 |
| The Object Class | p. 99 |
| Cloning Objects | p. 101 |
| Strategies for Cloning | p. 101 |
| Correct Cloning | p. 103 |
| Shallow versus Deep Cloning | p. 106 |
| Extending Classes: How and When | p. 107 |
| Designing a Class to Be Extended | p. 108 |
| Designing an Extensible Framework | p. 109 |
| Single Inheritance versus Multiple Inheritance | p. 114 |
| Interfaces | p. 117 |
| A Simple Interface Example | p. 118 |
| Interface Declarations | p. 120 |
| Interface Constants | p. 121 |
| Interface Methods | p. 122 |
| Interface Modifiers | p. 122 |
| Extending Interfaces | p. 122 |
| Inheriting and Hiding Constants | p. 123 |
| Inheriting, Overriding, and Overloading Methods | p. 125 |
| Working with Interfaces | p. 126 |
| Implementing Interfaces | p. 127 |
| Using an Implementation | p. 129 |
| Marker Interfaces | p. 130 |
| When to Use Interfaces | p. 131 |
| Nested Classes and Interfaces | p. 133 |
| Static Nested Types | p. 133 |
| Static Nested Classes | p. 134 |
| Nested Interfaces | p. 135 |
| Inner Classes | p. 136 |
| Accessing Enclosing Objects | p. 138 |
| Extending Inner Classes | p. 139 |
| Inheritance, Scoping, and Hiding | p. 140 |
| Local Inner Classes | p. 142 |
| Inner Classes in Static Contexts | p. 144 |
| Anonymous Inner Classes | p. 144 |
| Inheriting Nested Types | p. 146 |
| Nesting in Interfaces | p. 148 |
| Modifiable Variables in Interfaces | p. 149 |
| Implementation of Nested Types | p. 149 |
| Enumeration Types | p. 151 |
| A Simple Enum Example | p. 151 |
| Enum Declarations | p. 152 |
| Enum Modifiers | p. 154 |
| Enum Constant Declarations | p. 154 |
| Construction | p. 155 |
| Constant Specific Behavior | p. 156 |
| java.lang.Enum | p. 159 |
| To Enum or Not | p. 160 |
| Tokens, Values, and Variables | p. 161 |
| Lexical Elements | p. 161 |
| Character Set | p. 161 |
| Comments | p. 163 |
| Tokens | p. 164 |
| Identifiers | p. 164 |
| Keywords | p. 165 |
| Types and Literals | p. 166 |
| Reference Literals | p. 167 |
| Boolean Literals | p. 167 |
| Character Literals | p. 167 |
| Integer Literals | p. 167 |
| Floating-Point Literals | p. 168 |
| String Literals | p. 168 |
| Class Literals | p. 169 |
| Variables | p. 169 |
| Field and Local Variable Declarations | p. 170 |
| Parameter Variables | p. 171 |
| final Variables | p. 171 |
| Array Variables | p. 173 |
| Array Modifiers | p. 174 |
| Arrays of Arrays | p. 174 |
| Array Initialization | p. 175 |
| Arrays and Types | p. 177 |
| The Meanings of Names | p. 178 |
| Primitives as Types | p. 183 |
| Common Fields and Methods | p. 184 |
| Construction | p. 185 |
| Constants | p. 185 |
| Common Methods | p. 186 |
| Void | p. 187 |
| Boolean | p. 187 |
| Number | p. 188 |
| The Integer Wrappers | p. 188 |
| The Floating-Point Wrapper Classes | p. 191 |
| Character | p. 192 |
| Working with UTF-16 | p. 196 |
| Boxing Conversions | p. 198 |
| Operators and Expressions | p. 201 |
| Arithmetic Operations | p. 201 |
| Integer Arithmetic | p. 202 |
| Floating-Point Arithmetic | p. 202 |
| Strict and Non-Strict Floating-Point Arithmetic | p. 203 |
| General Operators | p. 204 |
| Increment and Decrement Operators | p. 205 |
| Relational and Equality Operators | p. 206 |
| Logical Operators | p. 207 |
| instanceof | p. 208 |
| Bit Manipulation Operators | p. 208 |
| The Conditional Operator? | p. 210 |
| Assignment Operators | p. 212 |
| String Concatenation Operator | p. 214 |
| new | p. 214 |
| Expressions | p. 214 |
| Order of Evaluation | p. 214 |
| Expression Type | p. 215 |
| Type Conversions | p. 216 |
| Implicit Type Conversions | p. 216 |
| Explicit Type Casts | p. 219 |
| String Conversions | p. 220 |
| Operator Precedence and Associativity | p. 221 |
| Member Access | p. 223 |
| Finding the Right Method | p. 224 |
| Control Flow | p. 229 |
| Statements and Blocks | p. 229 |
| if-else | p. 230 |
| switch | p. 232 |
| while and do-while | p. 235 |
| for | p. 236 |
| Basic for Statement | p. 236 |
| Enhanced for Statement | p. 239 |
| Labels | p. 241 |
| break | p. 241 |
| continue | p. 244 |
| return | p. 245 |
| What, No goto? | p. 246 |
| Generic Types | p. 247 |
| Generic Type Declarations | p. 250 |
| Bounded Type Parameters | p. 252 |
| Nested Generic Types | p. 253 |
| Working with Generic Types | p. 256 |
| Subtyping and Wildcards | p. 256 |
| Generic Methods and Constructors | p. 260 |
| Generic Invocations and Type Inference | p. 262 |
| Wildcard Capture | p. 264 |
| Under the Hood: Erasure and Raw Types | p. 267 |
| Erasure at Runtime | p. 267 |
| Overloading and Overriding | p. 271 |
| Finding the Right Method-Revisited | p. 272 |
| Class Extension and Generic Types | p. 276 |
| Exceptions and Assertions | p. 279 |
| Creating Exception Types | p. 280 |
| throw | p. 282 |
| Transfer of Control | p. 283 |
| Asynchronous Exceptions | p. 283 |
| The throws Clause | p. 283 |
| throws Clauses and Method Overriding | p. 285 |
| throws Clauses and Native Methods | p. 286 |
| try, catch, and finally | p. 286 |
| finally | p. 288 |
| Exception Chaining | p. 291 |
| Stack Traces | p. 294 |
| When to Use Exceptions | p. 294 |
| Assertions | p. 296 |
| The assert Statement | p. 297 |
| When to Use Assertions | p. 297 |
| State Assertions | p. 297 |
| Control Flow Assertions | p. 299 |
| Turning Assertions On and Off | p. 300 |
| Why Turn Assertions On and Off? | p. 300 |
| Controlling Assertions on the Command Line | p. 300 |
| Complete Removal | p. 302 |
| Making Assertions Required | p. 302 |
| Strings and Regular Expressions | p. 305 |
| Character Sequences | p. 305 |
| The String Class | p. 306 |
| Basic String Operations | p. 306 |
| String Comparisons | p. 308 |
| String Literals, Equivalence and Interning | p. 311 |
| Making Related Strings | p. 313 |
| String Conversions | p. 316 |
| Strings and char Arrays | p. 317 |
| Strings and byte Arrays | p. 319 |
| Character Set Encoding | p. 320 |
| Regular Expression Matching | p. 321 |
| Regular Expressions | p. 321 |
| Compiling and Matching with Regular Expressions | p. 323 |
| Replacing | p. 326 |
| Regions | p. 329 |
| Efficiency | p. 329 |
| The StringBuilder Class | p. 330 |
| Modifying the Buffer | p. 331 |
| Getting Data Out | p. 333 |
| Capacity Management | p. 334 |
| The StringBuffer Class | p. 335 |
| Working with UTF-16 | p. 336 |
| Threads | p. 337 |
| Creating Threads | p. 339 |
| Using Runnable | p. 341 |
| Synchronization | p. 345 |
| synchronized Methods | p. 346 |
| Static synchronized Methods | p. 348 |
| synchronized Statements | p. 348 |
| Synchronization Designs | p. 352 |
| wait, notifyAll, and notify | p. 354 |
| Details of Waiting and Notification | p. 357 |
| Thread Scheduling | p. 358 |
| Voluntary Rescheduling | p. 360 |
| Deadlocks | p. 362 |
| Ending Thread Execution | p. 365 |
| Cancelling a Thread | p. 365 |
| Waiting for a Thread to Complete | p. 367 |
| Ending Application Execution | p. 369 |
| The Memory Model: Synchronization and volatile | p. 370 |
| Synchronization Actions | p. 372 |
| Final Fields and Security | p. 373 |
| The Happens-Before Relationship | p. 374 |
| Thread Management, Security, and ThreadGroup | p. 375 |
| Threads and Exceptions | p. 379 |
| Don't stop | p. 381 |
| Stack Traces | p. 382 |
| ThreadLocal Variables | p. 382 |
| Debugging Threads | p. 384 |
| Annotations | p. 387 |
| A Simple Annotation Example | p. 388 |
| Annotation Types | p. 389 |
| Annotating Elements | p. 392 |
| Restricting Annotation Applicability | p. 393 |
| Retention Policies | p. 395 |
| Working with Annotations | p. 395 |
| Reflection | p. 397 |
| The Class Class | p. 399 |
| Type Tokens | p. 400 |
| Class Inspection | p. 402 |
| Examining Class Members | p. 408 |
| Naming Classes | p. 411 |
| Obtaining Class Objects by Name | p. 413 |
| Runtime Type Queries | p. 414 |
| Annotation Queries | p. 414 |
| The Modifier Class | p. 416 |
| The Member classes | p. 416 |
| Access Checking and AccessibleObject | p. 417 |
| The Field Class | p. 418 |
| Final Fields | p. 420 |
| The Method Class | p. 420 |
| Creating New Objects and the Constructor Class | p. 423 |
| Inner Class Constructors | p. 425 |
| Generic Type Inspection | p. 426 |
| Type Variables | p. 426 |
| Parameterized Types | p. 427 |
| Wildcards | p. 428 |
| Generic Arrays | p. 428 |
| String Representations of Type Objects | p. 428 |
| Arrays | p. 429 |
| Genericity and Dynamic Arrays | p. 430 |
| Packages | p. 432 |
| The Proxy Class | p. 432 |
| Loading Classes | p. 435 |
| The ClassLoader Class | p. 438 |
| Preparing a Class for Use | p. 441 |
| Loading Related Resources | p. 442 |
| Controlling Assertions at Runtime | p. 444 |
| Garbage Collection and Memory | p. 447 |
| Garbage Collection | p. 447 |
| A Simple Model | p. 448 |
| Finalization | p. 449 |
| Resurrecting Objects during finalize | p. 452 |
| Interacting with the Garbage Collector | p. 452 |
| Reachability States and Reference Objects | p. 454 |
| The Reference Class | p. 455 |
| Strengths of Reference and Reachability | p. 455 |
| Reference Queues | p. 459 |
| Finalization and Reachability | p. 464 |
| Packages | p. 467 |
| Package Naming | p. 468 |
| Type Imports | p. 469 |
| Package Access | p. 471 |
| Accessibility and Overriding Methods | p. 472 |
| Package Contents | p. 475 |
| Package Annotations | p. 476 |
| Package Objects and Specifications | p. 477 |
| Documentation Comments | p. 481 |
| The Anatomy of a Doc Comment | p. 482 |
| Tags | p. 483 |
| @see | p. 483 |
| {@link} and {@linkplain} | p. 484 |
| @param | p. 485 |
| @return | p. 485 |
| @throws and @exception | p. 485 |
| @deprecated | p. 486 |
| @author | p. 486 |
| @version | p. 487 |
| @since | p. 487 |
| {@literal} and {@code} | p. 487 |
| {@value} | p. 487 |
| {@docRoot} | p. 488 |
| {@inheritDoc} | p. 488 |
| Inheriting Method Documentation Comments | p. 489 |
| Inheriting @throws Comments | p. 490 |
| A Simple Example | p. 491 |
| External Conventions | p. 496 |
| Package and Overview Documentation | p. 496 |
| The doc-files Directory | p. 497 |
| Notes on Usage | p. 497 |
| The I/O Package | p. 499 |
| Streams Overview | p. 500 |
| Byte Streams | p. 501 |
| InputStream | p. 503 |
| OutputStream | p. 505 |
| Character Streams | p. 507 |
| Reader | p. 508 |
| Writer | p. 510 |
| Character Streams and the Standard Streams | p. 511 |
| InputStreamReader and OutputStreamWriter | p. 512 |
| A Quick Tour of the Stream Classes | p. 514 |
| Synchronization and Concurrency | p. 515 |
| Filter Streams | p. 516 |
| Buffered Streams | p. 518 |
| Piped Streams | p. 520 |
| ByteArray Byte Streams | p. 521 |
| CharArray Character Streams | p. 522 |
| String Character Streams | p. 523 |
| Print Streams | p. 525 |
| LineNumberReader | p. 527 |
| SequenceInputStream | p. 528 |
| Pushback Streams | p. 529 |
| StreamTokenizer | p. 532 |
| The Data Byte Streams | p. 537 |
| DataInput and DataOutput | p. 537 |
| The Data Stream Classes | p. 539 |
| Working with Files | p. 540 |
| File Streams and FileDescriptor | p. 540 |
| RandomAccessFile | p. 541 |
| The File Class | p. 543 |
| FilenameFilter and FileFilter | p. 548 |
| Object Serialization | p. 549 |
| The Object Byte Streams | p. 549 |
| Making Your Classes Serializable | p. 551 |
| Serialization and Deserialization Order | p. 552 |
| Customized Serialization | p. 554 |
| Object Versioning | p. 557 |
| Serialized Fields | p. 559 |
| The Externalizable Interface | p. 561 |
| Documentation Comment Tags | p. 562 |
| The IOException Classes | p. 563 |
| A Taste of New I/O | p. 565 |
| Collections | p. 567 |
| Collections | p. 567 |
| Exception Conventions | p. 570 |
| Iteration | p. 571 |
| Ordering with Comparable and Comparator | p. 574 |
| The Collection Interface | p. 575 |
| Set and SortedSet | p. 577 |
| HashSet | p. 579 |
| LinkedHashSet | p. 580 |
| TreeSet | p. 580 |
| List | p. 580 |
| ArrayList | p. 582 |
| LinkedList | p. 583 |
| RandomAccess Lists | p. 584 |
| Queue | p. 585 |
| PriorityQueue | p. 586 |
| Map and SortedMap | p. 587 |
| HashMap | p. 590 |
| LinkedHashMap | p. 591 |
| IdentityHashMap | p. 592 |
| WeakHashMap | p. 592 |
| TreeMap | p. 593 |
| enum Collections | p. 594 |
| EnumSet | p. 594 |
| EnumMap | p. 596 |
| Wrapped Collections and the Collections Class | p. 597 |
| The Collections Utilities | p. 597 |
| The Unmodifiable Wrappers | p. 601 |
| The Checked Wrappers | p. 601 |
| Synchronized Wrappers and Concurrent Collections | p. 602 |
| The Synchronized Wrappers | p. 602 |
| The Concurrent Collections | p. 604 |
| The Arrays Utility Class | p. 607 |
| Writing Iterator Implementations | p. 609 |
| Writing Collection Implementations | p. 611 |
| The Legacy Collection Types | p. 616 |
| Enumeration | p. 617 |
| Vector | p. 617 |
| Stack | p. 619 |
| Dictionary | p. 619 |
| Hashtable | p. 619 |
| Properties | p. 620 |
| Miscellaneous Utilities | p. 623 |
| Formatter | p. 624 |
| Format Specifiers | p. 626 |
| Integer Conversions | p. 627 |
| Floating-Point Conversions | p. 627 |
| Character Conversions | p. 629 |
| General Conversions | p. 629 |
| Custom Formatting | p. 630 |
| Format Exceptions | p. 630 |
| The Formatter Class | p. 631 |
| BitSet | p. 632 |
| Observer/Observable | p. 635 |
| Random | p. 639 |
| Scanner | p. 641 |
| Stream of Values | p. 641 |
| Scanning Lines | p. 644 |
| Using Scanner | p. 647 |
| Localization | p. 651 |
| StringTokenizer | p. 651 |
| Timer and TimerTask | p. 653 |
| UUID | p. 656 |
| Math and StrictMath | p. 657 |
| System Programming | p. 661 |
| The System Class | p. 662 |
| Standard I/O Streams | p. 662 |
| System Properties | p. 663 |
| Utility Methods | p. 665 |
| Creating Processes | p. 666 |
| Process | p. 667 |
| Process Environments | p. 669 |
| ProcessBuilder | p. 670 |
| Portability | p. 672 |
| Shutdown | p. 672 |
| Shutdown Hooks | p. 672 |
| The Shutdown Sequence | p. 674 |
| Shutdown Strategies | p. 674 |
| The Rest of Runtime | p. 675 |
| Loading Native Code | p. 676 |
| Debugging | p. 676 |
| Security | p. 677 |
| The SecurityManager Class | p. 678 |
| Permissions | p. 679 |
| Security Policies | p. 680 |
| Access Controllers and Privileged Execution | p. 681 |
| Internationalization and Localization | p. 685 |
| Locale | p. 686 |
| Resource Bundles | p. 688 |
| ListResourceBundle | p. 691 |
| PropertyResourceBundle | p. 692 |
| Subclassing ResourceBundle | p. 693 |
| Currency | p. 694 |
| Time, Dates, and Calendars | p. 695 |
| Calendars | p. 695 |
| Time Zones | p. 700 |
| GregorianCalendar and SimpleTimeZone | p. 701 |
| Formatting and Parsing Dates and Times | p. 703 |
| Using Formatter with Dates and Times | p. 706 |
| Internationalization and Localization for Text | p. 708 |
| Collation | p. 708 |
| Formatting and Parsing | p. 710 |
| Text Boundaries | p. 712 |
| Standard Packages | p. 715 |
| java.awt-The Abstract Window Toolkit | p. 717 |
| java.applet-Applets | p. 720 |
| java.beans-Components | p. 721 |
| java.math-Mathematics | p. 722 |
| java.net-The Network | p. 724 |
| java.rmi-Remote Method Invocation | p. 727 |
| java.security and Related Packages-Security Tools | p. 732 |
| java.sql-Relational Database Access | p. 732 |
| Utility Subpackages | p. 733 |
| Concurrency Utilities-java.util.concurrent | p. 733 |
| Archive Files-java.util.jar | p. 735 |
| ZIP Files-java.util.zip | p. 736 |
| javax.*-Standard Extensions | p. 737 |
| javax.accessibility-Accessibility for GUIs | p. 737 |
| javax.naming-Directory and Naming Services | p. 738 |
| javax.sound-Sound Manipulation | p. 739 |
| javax.swing-Swing GUI Components | p. 740 |
| org.omg.CORBA-CORBA APIs | p. 740 |
| Application Evolution | p. 741 |
| Language, Library, and Virtual Machine Versions | p. 741 |
| Dealing with Multiple Dialects | p. 743 |
| Generics: Reification, Erasure, and Raw Types | p. 744 |
| Raw Types, "Unchecked" Warnings, and Bridge Methods | p. 745 |
| API Issues | p. 747 |
| Useful Tables | p. 749 |
| Further Reading | p. 755 |
| Index | p. 761 |
| Table of Contents provided by Ingram. All Rights Reserved. |
ISBN: 9780321349804
ISBN-10: 0321349806
Series: Java Series
Published: 1st August 2005
Format: Paperback
Language: English
Number of Pages: 928
Audience: College, Tertiary and University
Publisher: Pearson Education (US)
Country of Publication: US
Edition Number: 4
Edition Type: Revised
Dimensions (cm): 22.86 x 19.05 x 3.81
Weight (kg): 1.36
Shipping
| Standard Shipping | Express Shipping | |
|---|---|---|
| Metro postcodes: | $9.99 | $14.95 |
| Regional postcodes: | $9.99 | $14.95 |
| Rural postcodes: | $9.99 | $14.95 |
Orders over $89.00 qualify for free shipping.
How to return your order
At Booktopia, we offer hassle-free returns in accordance with our returns policy. If you wish to return an item, please get in touch with Booktopia Customer Care.
Additional postage charges may be applicable.
Defective items
If there is a problem with any of the items received for your order then the Booktopia Customer Care team is ready to assist you.
For more info please visit our Help Centre.
You Can Find This Book In

Architecture Patterns with Python
Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Paperback
RRP $125.75
$100.60
OFF























