Java 5.0 Tiger: A Developer's Notebook


Java 5.0, code-named "Tiger", promises to be the most significant new version of Java since the introduction of the language. With over a hundred substantial changes to the core language, as well as numerous library and API additions, developers have a variety of new features, facilities, and techniques available.

But with so many changes, where do you start? You could read through the lengthy, often boring language specification; you could wait for the latest 500 page tome on ...

See more details below
Paperback (New Edition)
$26.02 price
(Save 25%)$34.99 List Price
Other sellers (Paperback)
  • All (36) from $1.99   
  • New (4) from $19.17   
  • Used (32) from $1.99   
Sending request ...


Java 5.0, code-named "Tiger", promises to be the most significant new version of Java since the introduction of the language. With over a hundred substantial changes to the core language, as well as numerous library and API additions, developers have a variety of new features, facilities, and techniques available.

But with so many changes, where do you start? You could read through the lengthy, often boring language specification; you could wait for the latest 500 page tome on concepts and theory; you could even play around with the new JDK, hoping you figure things out—or you can get straight to work with Java 5.0 Tiger: A Developer's Notebook.

This no-nonsense, down-and-dirty guide by bestselling Java authors Brett McLaughlin and David Flanagan skips all the boring prose and lecture, and jumps right into Tiger. You'll have a handle on the important new features of the language by the end of the first chapter, and be neck-deep in code before you hit the halfway point. Using the task-oriented format of this new series, you'll get complete practical coverage of generics, learn how boxing and unboxing affects your type conversions, understand the power of varargs, learn how to write enumerated types and annotations, master Java's new formatting methods and the for/in loop, and even get a grip on concurrency in the JVM.

Light on theory and long on practical application, Java 5.0 Tiger: A Developer's Notebook allows you to cut to the chase, getting straight to work with Tiger's new features. The new Developer's Notebooks series from O'Reilly covers important new tools for software developers. Emphasizing example over explanation and practice over theory, they focus on learning by doing—you'll get the goods straight from the masters, in an informal and code-intensive style that suits developers. If you've been curious about Tiger, but haven't known where to start, this no-fluff, lab-style guide is the solution.

Read More Show Less

Product Details

  • ISBN-13: 9780596007386
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 6/28/2004
  • Series: Developer's Notebook Series
  • Edition description: New Edition
  • Pages: 202
  • Product dimensions: 6.51 (w) x 9.72 (h) x 0.50 (d)

Meet the Author

Brett McLaughlin is a bestselling and award-winning non-fiction author. His books on computer programming, home theater, and analysis and design have sold in excess of 100,000 copies. He has been writing, editing, and producing technical books for nearly a decade, and is as comfortable in front of a word processor as he is behind a guitar, chasing his two sons and his daughter around the house, or laughing at reruns of Arrested Development with his wife.

Brett spends most of his time these days on cognitive theory, codifying and expanding on the learning principles that shaped the Head First series into a bestselling phenomenon. He's curious about how humans best learn, why Star Wars was so formulaic and still so successful, and is adamant that a good video game is the most effective learning paradigm we have.

David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His books with O'Reilly include Java in a Nutshell, Java Examples in a Nutshell, Java Foundation Classes in a Nutshell, JavaScript: The Definitive Guide, and JavaScript Pocket Reference. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and children in the U.S. Pacific Northwest bewteen the cities of Seattle, Washington and Vancouver, British Columbia. David has a blog at

Read More Show Less

Table of Contents

The Developer's Notebook Series;
Notebooks Are...;
Notebooks Aren't...;
How This Book Was Written;
About the Examples;
Conventions Used in This Book;
How to Contact Us;
Acknowledgments from Brett;
Acknowledgments from David;
Chapter 1: What's New?;
1.1 Working with Arrays;
1.2 Using Queues;
1.3 Ordering Queues Using Comparators;
1.4 Overriding Return Types;
1.5 Taking Advantage of Better Unicode;
1.6 Adding StringBuilder to the Mix;
Chapter 2: Generics;
2.1 Using Type-Safe Lists;
2.2 Using Type-Safe Maps;
2.3 Iterating Over Parameterized Types;
2.4 Accepting Parameterized Types as Arguments;
2.5 Returning Parameterized Types;
2.6 Using Parameterized Types as Type Parameters;
2.7 Checking for Lint;
2.8 Generics and Type Conversions;
2.9 Using Type Wildcards;
2.10 Writing Generic Types;
2.11 Restricting Type Parameters;
Chapter 3: Enumerated Types;
3.1 Creating an Enum;
3.2 Declaring Enums Inline;
3.3 Iterating Over Enums;
3.4 Switching on Enums;
3.5 Maps of Enums;
3.6 Sets of Enums;
3.7 Adding Methods to an Enum;
3.8 Implementing Interfaces with Enums;
3.9 Value-Specific Class Bodies;
3.10 Manually Defining an Enum;
3.11 Extending an Enum;
Chapter 4: Autoboxing and Unboxing;
4.1 Converting Primitives to Wrapper Types;
4.2 Converting Wrapper Types to Primitives;
4.3 Incrementing and Decrementing Wrapper Types;
4.4 Boolean Versus boolean;
4.5 Conditionals and Unboxing;
4.6 Control Statements and Unboxing;
4.7 Method Overload Resolution;
Chapter 5: varargs;
5.1 Creating a Variable-Length Argument List;
5.2 Iterating Over Variable-Length Argument Lists;
5.3 Allowing Zero-Length Argument Lists;
5.4 Specify Object Arguments Over Primitives;
5.5 Avoiding Automatic Array Conversion;
Chapter 6: Annotations;
6.1 Using Standard Annotation Types;
6.2 Annotating an Overriding Method;
6.3 Annotating a Deprecated Method;
6.4 Suppressing Warnings;
6.5 Creating Custom Annotation Types;
6.6 Annotating Annotations;
6.7 Defining an Annotation Type's Target;
6.8 Setting the Retention of an Annotation Type;
6.9 Documenting Annotation Types;
6.10 Setting Up Inheritance in Annotations;
6.11 Reflecting on Annotations;
Chapter 7: The for/in Statement;
7.1 Ditching Iterators;
7.2 Iterating over Arrays;
7.3 Iterating over Collections;
7.4 Avoiding Unnecessary Typecasts;
7.5 Making Your Classes Work with for/in;
7.6 Determining List Position and Variable Value;
7.7 Removing List Items in a for/in Loop;
Chapter 8: Static Imports;
8.1 Importing Static Members;
8.2 Using Wildcards in Static Imports;
8.3 Importing Enumerated Type Values;
8.4 Importing Multiple Members with the Same Name;
8.5 Shadowing Static Imports;
Chapter 9: Formatting;
9.1 Creating a Formatter;
9.2 Writing Formatted Output;
9.3 Using the format( ) Convenience Method;
9.4 Using the printf( ) Convenience Method;
Chapter 10: Threading;
10.1 Handling Uncaught Exceptions in Threads;
10.2 Using Thread-Safe Collections;
10.3 Using Blocking Queues;
10.4 Specifying Timeouts for Blocking;
10.5 Separating Thread Logic from Execution Logic;
10.6 Using Executor as a Service;
10.7 Using Callable Objects;
10.8 Executing Tasks Without an ExecutorService;
10.9 Scheduling Tasks;
10.10 Advanced Synchronizing;
10.11 Using Atomic Types;
10.12 Locking Versus Synchronization;

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
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted July 2, 2004

    Quick learning about 1.5

    Java 1.5 has started to emerge into general usage. But most of us Java programmers are still safely ensconced in 1.4. Not a few are undoubtedly wondering what the big deal is about 1.5. If you're like me, you are probably quite satisfied with 1.4. Well this book quickly attempts to change that opinion. It hits all the new stuff, with simple descriptions and example code. Like autoboxing. Nothing deep about this, to say the least. But it really eliminates a lot of visual clutter in your source code, when you have to go between a primitive and its wrapper type. It is the analog of how you can do (eg) System.out.println(' t='+t+' d='+d); where t and d can be any primitive types, and the jvm figures out the printing for you. You don't have to specifically describe the output format for each type, as you have to in C. The wonder about autoboxing (and its inverse) is that it was not introduced way earlier. Well, anyway, you have it now. Long time C programmers will also welcome varargs, which are variable argument lists. Ever since Java came out in 1996, many asked for this ability. This push has gone on for years. Finally, they scored and we have varargs. Other 1.5 changes are covered. But the above should be enough to give you a flavour of what the book offers.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

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