Java Cookbook, 2nd Edition
Publisher: O'Reilly Media
Final Release Date: June 2004
Pages: 864

You have a choice: you can wade your way through lengthy Java tutorials and figure things out by trial and error, or you can pick up Java Cookbook, 2nd Edition and get to the heart of what you need to know when you need to know it.With the completely revised and thoroughly updated Java Cookbook, 2nd Edition, Java developers like you will learn by example, try out new features, and use sample code to understand how new additions to the language and platform work--and how to put them to work for you.This comprehensive collection of problems, solutions, and practical examples will satisfy Java developers at all levels of expertise. Whether you're new to Java programming and need something to bridge the gap between theory-laden reference manuals and real-world programs or you're a seasoned Java programmer looking for a new perspective or a different problem-solving context, this book will help you make the most of your Java knowledge.Packed with hundreds of tried-and-true Java recipes covering all of the major APIs from the 1.4 version of Java, this book also offers significant first-look recipes for the most important features of the new 1.5 version, which is in beta release. You get practical solutions to everyday problems, and each is followed by a detailed, ultimately useful explanation of how and why the technology works.Java Cookbook, 2nd Edition includes code segments covering many specialized APIs--like those for working with Struts, Ant and other new popular Open Source tools. It also includes expanded Mac OS X Panther coverage and serves as a great launching point for Java developers who want to get started in areas outside of their specialization.In this major revision, you'll find succinct pieces of code that can be easily incorporated into other programs. Focusing on what's useful or tricky--or what's useful and tricky--Java Cookbook, 2nd Edition is the most practical Java programming book on the market.

Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillyJava Cookbook, 2nd Edition

(based on 5 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 5 customers

Displaying reviews 1-5

Back to top


I'm hoping for a new release sometime!

By thejartender (The Jar Bar).

from Borgund, Norway

About Me Designer, Developer

Verified Reviewer


  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written


  • Needs an update

Best Uses

  • Expert
  • Intermediate
  • Novice

Comments about oreilly Java Cookbook, 2nd Edition:

My first Cookbook from Oreilly Media was this one and my advice is to keep it in arms reach once you own a copy. It is fille with useful information for all the typical tiers that the JDK allows you to develop with.

It's 2012 now and I seriously am hoping for an updated version of this book. Oreilly cookbooks are usually not for a beginner, but this Java one certainly can aid beginners with it's first few chapters.


The best book on Java!

By dureza

from Undisclosed

Comments about oreilly Java Cookbook, 2nd Edition:

I have many books about Java. This one is the best that I bought. Some time ago if I had bought Java Cookbook, 2Ed, perhaps I don't have bought another books. Thanks Ian F. Darwin & O'Reilly Editions. My students will apreciate the diference!

(2 of 2 customers found this review helpful)


Still A Great Java Resource!

By Dave Walz-Burkett

from Undisclosed

Comments about oreilly Java Cookbook, 2nd Edition:

I bought the first version of the Java Cookbook many years ago and it was a huge find back then. There were few online resources at the time loaded with really great, consistent sample code, like The book filled a need then and it fills a need now.

The book covers subjects of interest for programmers with any level of Java expertise. It is written in the classic 'cookbook' format. Each chapter concentrates on a specific area, like 'String and Things', 'Pattern Matching with Regular Expressions', 'Object-Oriented Techniques', 'Network Clients', 'Database Access', 'Threaded Java', etc.

Within each chapter, several problems are tackled. One or more pages are devoted to each problem, with a general format of: 'Problem', 'Solution', and 'Discussion'. Many of the problems build on previous solutions. Nearly every solution contains a Java example and the code tends to be simple enough to grok at a glance.

The book has been updated to cover some 1.4 and 1.5 goodies, but not nearly as much as I would have liked. However, the most fundamental topics are covered well - certainly well enough for an 800+ page cookbook with 312 recipes that cover a wide range of topics.

If you are like me and spend a lot of time learning by example, you will find this book an excellent resource.

(0 of 2 customers found this review helpful)


bugfixes in cal.php (calendar script)

By Alexander Naumann

from Undisclosed

Comments about oreilly Java Cookbook, 2nd Edition:

I really like the calendar-script in 'PHP Hacks' (O'Reilly) in which I fill the daycells with information from a database. You can find the script with some necessary bugfixes in [@] . The paging from year to year didn't work properly (at least not when I tried it). One variable was misspelled and one was not used at all.The only thing which I changed in the view was that the weeks now start on Monday. In the download-file the old code is commented.Have fun !Chickenman


Review of Java Cookbook, 2nd

By Val

from Undisclosed

Comments about oreilly Java Cookbook, 2nd Edition:

Ever gotten tired of wading through endless reference books or crawling the web seeking for small code snippets that solve common and ever-recurring problems? Don't look further, this book is for you. In this second and revamped version of the Java Cookbook, you will find tons of very valuable resources for your everyday programming tasks. The author, a long-time practitioner, adopts a "learn-by-example" approach by providing small code recipes which cover almost all APIs from the 1.4 version as well as some new killer features of Java 5.

The number of subjects the author delves into is truly impressive. Apart from the traditional topics like effective string manipulation, threading, I18N and L10N, GUIs, RMI and networking, I/O and file system operations, and many more, the author also focuses on external devices and serial/parallel port programming, electronic mail, reflection and introspection, graphics and sound, pattern matching, generics, autoboxing, packaging and how to use Java with other languages.

I really enjoyed reading this very helpful resource and I would definitely recommend it to Java programmers of any level in urgent need of some code ammo to put in their backpack.

More reviews on Val's blog (

Displaying reviews 1-5

Back to top

Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?