
At a Glance
700 Pages
Revised
23.2 x 15.6 x 4.0
Paperback
RRP $75.95
$39.75
48%OFF
or 4 interest-free payments of $9.94 with
orShips in 15 to 25 business days
The author of the best-selling Java in a Nutshell has created an entire book of real-world Java programming examples that you can learn from. If you learn best "by example," this is the book for you.This third edition covers Java 1.4 and contains 193 complete, practical examples: over 21,900 lines of densely commented, professionally written Java code, covering 20 distinct client-side and server-side APIs. It includes new chapters on the Java Sound API and the New I/O API. The chapters on XML and servlets have been rewritten to cover the latest versions of the specifications and to demonstrate best practices for Java 1.4. New and updated examples throughout the book demonstrate many other new Java features and APIs.Java Examples in a Nutshell is a companion volume to Java in a Nutshell, Java Foundation Classes in a Nutshell, and Java Enterprise in a Nutshell. It picks up where those quick references leave off, providing a wealth of examples for both novices and experts. This book doesn't hold your hand; it simply delivers well-commented working examples with succinct explanations to help you learn and explore Java and its APIs.Java Examples in a Nutshell contains examples that demonstrate:
- Core APIs, including I/O, New I/O, threads, networking, security, serialization, and reflection
- Desktop APIs, highlighting Swing GUIs, Java 2D graphics, preferences, printing, drag-and-drop, JavaBeans, applets, and sound
- Enterprise APIs, including JDBC (database access), JAXP (XML parsing and transformation), Servlets 2.4, JSP 2.0 (JavaServer Pages), and RMI
Industry Reviews
| Preface | p. xi |
| Learning Java | |
| Java Basics | p. 3 |
| Hello World | p. 3 |
| FizzBuzz | p. 7 |
| The Fibonacci Series | p. 9 |
| Using Command-Line Arguments | p. 10 |
| Echo in Reverse | p. 11 |
| FizzBuzz Switched | p. 12 |
| Computing Factorials | p. 13 |
| Recursive Factorials | p. 14 |
| Caching Factorials | p. 14 |
| Computing Big Factorials | p. 16 |
| Handling Exceptions | p. 17 |
| Interactive Input | p. 18 |
| Using a StringBuffer | p. 19 |
| Sorting Numbers | p. 21 |
| Computing Primes | p. 22 |
| Objects, Classes, and Interfaces | p. 24 |
| A Rectangle Class | p. 25 |
| Testing the Rect Class | p. 26 |
| A Rect Subclass | p. 27 |
| Another Subclass | p. 28 |
| Complex Numbers | p. 29 |
| Computing Statistics | p. 31 |
| An Integer List | p. 33 |
| Tokenizing Text | p. 37 |
| Core Java APIs | |
| Input/Output | p. 59 |
| Files and Streams | p. 59 |
| Working with Files | p. 62 |
| Copying File Contents | p. 63 |
| Reading and Displaying Text Files | p. 66 |
| Listing Directory and File Information | p. 70 |
| Compressing Files and Directories | p. 75 |
| Filtering Character Streams | p. 77 |
| Tokenizing a Character Stream | p. 79 |
| Random Access to Files | p. 81 |
| Threads | p. 85 |
| Thread Basics | p. 86 |
| Thread-Safe Classes | p. 88 |
| Threads and Thread Groups | p. 90 |
| Deadlock | p. 92 |
| Timers | p. 94 |
| Networking | p. 102 |
| Downloading the Contents of a URL | p. 102 |
| Using a URL Connection | p. 104 |
| Sending Email Through a URL Connection | p. 105 |
| A Simple Network Client | p. 107 |
| A Generic Client | p. 109 |
| An HTTP Client | p. 112 |
| A POP Client | p. 115 |
| A Simple Web Server | p. 121 |
| A Proxy Server | p. 123 |
| A Generic Multithreaded Server | p. 126 |
| Sending Datagrams | p. 139 |
| Receiving Datagrams | p. 141 |
| New I/O | p. 144 |
| Locking Files | p. 146 |
| Copying Files | p. 148 |
| Regular Expressions and Character Decoding | p. 150 |
| File Copying with Buffers | p. 153 |
| Advanced Byte-to-Character Conversion | p. 155 |
| Tokenizing Byte Buffers | p. 157 |
| A Simple HTTP Client | p. 162 |
| The Daytime Service | p. 166 |
| A Multiplexed Server | p. 172 |
| A Multiplexed Network Client | p. 175 |
| Security and Cryptography | p. 187 |
| Running Untrusted Code | p. 188 |
| Loading Untrusted Code | p. 189 |
| Message Digests and Digital Signatures | p. 194 |
| Cryptography | p. 203 |
| Internationalization | p. 208 |
| A Word About Locales | p. 208 |
| Unicode | p. 209 |
| Character Encodings | p. 214 |
| Handling Local Customs | p. 215 |
| Localizing User-Visible Messages | p. 220 |
| Formatted Messages | p. 225 |
| Reflection | p. 230 |
| Obtaining Class and Member Information | p. 230 |
| Invoking a Named Method | p. 233 |
| Proxy Objects | p. 238 |
| Object Serialization | p. 241 |
| Simple Serialization | p. 241 |
| Custom Serialization | p. 245 |
| Externalizable Classes | p. 247 |
| Serialization and Class Versioning | p. 249 |
| Desktop Java APIs | |
| Graphical User Interfaces | p. 255 |
| Components | p. 257 |
| Containers | p. 259 |
| Layout Management | p. 260 |
| Event Handling | p. 274 |
| A Complete GUI | p. 291 |
| Actions and Reflection | p. 295 |
| Custom Dialogs | p. 297 |
| An Error Handler Dialog | p. 302 |
| Displaying Tables | p. 308 |
| Displaying Trees | p. 311 |
| A Simple Web Browser | p. 315 |
| Describing GUIs with Properties | p. 324 |
| Themes and the Metal Look-and-Feel | p. 336 |
| Look-and-Feel Preferences | p. 341 |
| The ShowBean Program | p. 344 |
| Graphics | p. 353 |
| Graphics Before Java 1.2 | p. 354 |
| The Java 2D API | p. 363 |
| Drawing and Filling Shapes | p. 365 |
| Transforms | p. 367 |
| Line Styles with BasicStroke | p. 369 |
| Stroking Lines | p. 371 |
| Filling Shapes with Paint | p. 372 |
| Antialiasing | p. 376 |
| Combining Colors with AlphaComposite | p. 377 |
| Image Processing | p. 381 |
| Image I/O | p. 385 |
| Custom Shapes | p. 387 |
| Custom Strokes | p. 396 |
| Custom Paint | p. 400 |
| Advanced Animation | p. 402 |
| Displaying Graphics Examples | p. 405 |
| Printing | p. 411 |
| Printing with the Java 1.1 API | p. 412 |
| Printing with the Java 1.2 API | p. 416 |
| Printing with the Java 1.4 API | p. 419 |
| Printing Multipage Text Documents | p. 422 |
| Advanced Printing with Java 1.4 | p. 431 |
| Data Transfer | p. 438 |
| Simple Swing Data Transfer | p. 438 |
| A Clock with Drag and Copy Support | p. 440 |
| Data Transfer Architecture | p. 443 |
| Dropping Multiple Datatypes | p. 443 |
| A Transferable Shape | p. 447 |
| Custom Data Transfer | p. 447 |
| JavaBeans | p. 456 |
| Bean Basics | p. 457 |
| A Simple Bean | p. 458 |
| A More Complex Bean | p. 462 |
| Custom Events | p. 467 |
| Specifying Bean Information | p. 468 |
| Defining a Simple Property Editor | p. 470 |
| Defining a Complex Property Editor | p. 473 |
| Defining a Bean Customizer | p. 474 |
| Manipulating Beans | p. 477 |
| Applets | p. 487 |
| Introduction to Applets | p. 488 |
| A First Applet | p. 489 |
| A Clock Applet | p. 490 |
| A Timer Applet | p. 493 |
| Applets and the Java 1.0 Event Model | p. 497 |
| Sound | p. 501 |
| Ringing the Bell | p. 502 |
| Swing Aural Cues | p. 503 |
| Playing Sounds with AudioClip | p. 503 |
| Playing Sounds with javax.sound | p. 504 |
| Streaming Sounds with javax.sound | p. 512 |
| Synthesizing a MIDI Sequence | p. 515 |
| Real-Time MIDI Sounds | p. 520 |
| Enterprise Java APIs | |
| Database Access with SQL | p. 525 |
| Accessing a Database | p. 526 |
| Using Database Metadata | p. 533 |
| Building a Database | p. 536 |
| Using the API Database | p. 541 |
| Atomic Transactions | p. 546 |
| XML | p. 547 |
| Parsing with JAXP and SAX | p. 547 |
| Parsing and Manipulating with JAXP and DOM | p. 552 |
| Transforming XML with XSLT | p. 556 |
| An XML Pull Parser | p. 557 |
| Servlets and JavaServer Pages | p. 569 |
| Servlet Setup | p. 570 |
| A Hello World Servlet | p. 573 |
| Another Simple Servlet | p. 575 |
| Servlet Initialization and Persistence: A Counter Servlet | p. 576 |
| Hello JSP | p. 581 |
| Hello JSP2 | p. 583 |
| Hello XML | p. 585 |
| The MVC Paradigm for Web Applications | p. 586 |
| ListManager Model Classes | p. 586 |
| ListManager Controller | p. 590 |
| ListManager Views | p. 595 |
| Custom Tags in JSP 2.0 | p. 598 |
| Packaging a Web Application | p. 600 |
| Remote Method Invocation | p. 605 |
| Remote Banking | p. 606 |
| A Bank Server | p. 610 |
| A Persistent Bank Server | p. 614 |
| A Multiuser Domain | p. 621 |
| Remote MUD Interfaces | p. 622 |
| The MUD Server | p. 625 |
| The MudPlace Class | p. 628 |
| The MudPerson Class | p. 637 |
| A MUD Client | p. 638 |
| Advanced RMI | p. 647 |
| Example Index | p. 650 |
| Index | p. 675 |
| Table of Contents provided by Rittenhouse. All Rights Reserved. |
ISBN: 9780596006204
ISBN-10: 0596006209
Series: In a Nutshell
Published: 6th February 2004
Format: Paperback
Language: English
Number of Pages: 700
Audience: General Adult
Publisher: O'Reilly Media, Inc, USA
Country of Publication: GB
Edition Number: 3
Edition Type: Revised
Dimensions (cm): 23.2 x 15.6 x 4.0
Weight (kg): 0.98
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 $79.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
$60.99
OFF

Apache Iceberg: The Definitive Guide
Data Lakehouse Functionality, Performance, and Scalability on the Data Lake
Paperback
RRP $133.00
$64.75
OFF
This product is categorised by
- Non-FictionComputing & I.T.Computer Programming & Software DevelopmentObject-Oriented Programming or OOP
- Non-FictionComputing & I.T.Computer Programming & Software DevelopmentWeb Programming
- Non-FictionComputing & I.T.Computer Programming & Software DevelopmentSoftware Engineering
- Booktopia Publisher ServicesJohn Wiley & Sons Publishers UK






















