Make it Stick
Other Java books from O’Reilly
Head First Design Patterns
Head First Servlets
Head First EJB™
Ant: The Defi nitive Guide™
Better, Faster, Lighter Java™
Enterprise JavaBeans™
Hibernate: A Developer’s Notebook
Java™ 1.5 Tiger: A Developer’s Notebook
Java™ Cookbook
Java™
in a Nutshell
Java™ Network Programming
Java™ Servlet & JSP Cookbook
Java™ Swing
JavaServer Faces™
JavaServer Pages™
Programming Jakarta Struts
Tomcat: the Defi nitive Guide
Be watching for more books in the Head First series
Head First Java
™
Second Edition
by Kathy Sierra and Bert Bates
Copyright © 2003, 2005 by O’Reilly Media, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly Media books may
be purchased for educational, business, or sales promotional use.
Online editions are also available for most titles (safari.oreilly.com). For more information,
contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.
Editor:
Mike Loukides
Cover Designer:
Edie Freedman
Interior Designers:
Kathy Sierra and Bert Bates
Printing History:
May 2003:
First Edition.
February 2005:
Second Edition.
(You might want to pick up a copy of
both editions... for your kids. Think eBay™)
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Java and all Java-based
trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc., in the
United States and other countries. O’Reilly Media, Inc. is independent of Sun Microsystems.
Many of the designations used by manufacturers and sellers to distinguish
their products are
claimed as trademarks.
Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark
claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and the
authors assume no responsibility for errors or omissions, or for damages resulting from the use of
the information contained herein.
In other words, if you use anything in
Head First Java™ to, say, run a
nuclear power plant or air
traffic control system, you’re on your own.
ISBN: 0596009208
[M]
Creators of the Head First series
Kathy Sierra
Kathy
has been interested in learning theory
since her days as a game designer (she wrote
games for Virgin, MGM, and Amblin’). She
developed much of
the Head First format while
teaching New Media Authoring for UCLA
Extension’s Entertainment Studies program.
More recently, she’s been a master trainer for Sun
Microsystems, teaching Sun’s Java instructors how
to teach the latest Java technologies, and a lead
developer of several of Sun’s Java programmer
and developer certifi cation exams. Together
with Bert Bates, she has been actively using the
concepts in Head First
Java to teach hundreds of
trainers, developers and even non-programmers.
She is also the founder of one of the largest Java
community websites in the world, javaranch.com,
and the Creating Passionate Users blog.
Along with this book, Kathy co-authored Head
First Servlets, Head First EJB, and Head First
Design Patterns.
In her spare time she enjoys her new Icelandic
horse, skiing, running, and the speed of light.
kathy@wickedlysmart.com
Bert
is a software
developer and architect, but a
decade-long stint in artifi cial intelligence drove
his interest in learning theory and technology-
based training. He’s been teaching programming
to clients ever since. Recently, he’s been a
member of the development team for several of
Sun’s Java Certifi cation exams.
He spent the fi rst decade of his software career
travelling the world to
help broadcast clients like
Radio New Zealand, the Weather Channel, and
the Arts & Entertainment Network (A & E). One
of his all-time favorite projects was building a full
rail system simulation for Union Pacifi c Railroad.
Bert is a hopelessly addicted Go player, and has
been working on a Go program for way too long.
He’s a fair guitar player, now trying his hand at
banjo, and likes to spend time skiing, running,
and trying to train (or learn from) his Icelandic
horse Andi.
Bert co-authored
the same books as Kathy, and is
hard at work on the next batch of books (check
the blog for updates).
You can sometimes catch him on the IGS Go
server (under the login
jackStraw).
terrapin@wickedlysmart.com
Bert Bates
Although Kathy and Bert try to answer as much email as they can, the volume of mail and their travel schedule makes that
difficult. The best (quickest) way to get technical help with the book is at the
very active Java beginners forum at javaranch.com.