ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button O'Reilly Book Excerpts: Java 1.5 Tiger: A Developer's Notebook

Creating Varargs in Java 1.5 Tiger

by Brett McLaughlin and David Flanagan

Related Reading

Java 5.0 Tiger: A Developer's Notebook
By David Flanagan, Brett McLaughlin

Editor's note: O'Reilly's new Developer's Notebook series focuses on learning by doing -- you get the goods straight from the masters, in an informal and code-intensive style suited to software developers. Java 1.5 Tiger: A Developer's Notebook, by bestselling Java authors Brett McLaughlin and David Flanagan, follows the same task-oriented format, jumping you right into Tiger. The book covers the important new features of Java 1.5, including generics, boxing and unboxing, varargs, and much more.

In this excerpt from Chapter 5 of the book, Brett and David cover how to create and iterate over variable-length argument lists (better known as varargs), which will have you writing better, cleaner, more flexible code in no time.

We are presenting this book excerpt as a PDF download. The file size is a little over 190KB. Download Chapter 5: "varargs."

Brett McLaughlin had developed enterprise Java applications for Nextel Communications and Allegiance Telecom. When that became fairly mundane, Brett took on application servers. He then got hooked on open source software, and helped found several cool programming tools, like Jakarta turbine and JDOM.

David Flanagan is the author of a number of O'Reilly books, including Java in a Nutshell, Java Examples in a Nutshell, Java Foundation Classes in a Nutshell, JavaScript: The Definitive Guide, and JavaScript Pocket Reference.

Return to ONJava.com.