Java Cookbook
Ian F. Darwin
Publisher: O'Reilly Media.

Edition, ISBN O'Reilly BookShop eBooks.com B & N Amazon Notes
Fifth Edition, March 2025
9781098169961
O'Reilly BookShop T.B.A. T.B.A. Amazon Coverage up to Java 23, most of Java 24.
Fourth Edition, March 2020
978-1492072583
O'Reilly BookShop eBooks.com B & N Amazon Fully updated for Java 13!
(And even some Java 14 stuff!)
Third Edition, 2014
978-1449337049
O'Reilly Obsolete - do not buy - only goes up to Java 8.
Second Edition, 2004
0-596-00701-9
O'Reilly Obsolete - do not buy
First Edition, 2001
0-596-00170-4
O'Reilly Obsolete - do not buy
Java Cookbook cover github

About...

This book offers something for everyone who wants to learn more about Java. It makes an ideal second book of Java for any developer/analyst/architect, computer science student, or any other serious student of Java. In other words, this book covers the details that they didn't teach you in Java 101. I don't cover the basics of Java syntax, but start with coverage of essential APIs such as String handling, numbers, and dates and times. From there I move into object-oriented and functional programming with Streams, then on into networking (client, web services, brief coverage of server tech). I finish up with some important but sometimes-neglected aspects of Java such as Threads, other languages and native code.

For each topic I give around a dozen main ``how-to'' recipes consisting of a problem statement, a quick solution, and more detailed example with code attached (full code available from the download link).

What they're saying...

"Ian has done a wonderful job touching on just about every topic you are likely to run into as a Java developer. I especially recommend it to catch up on the features in newer Java versions as they can be applied to old problems."
Andrew Slice, RedHat.

"Every Java development team should have at least a reference copy of this book available."
George Bull, J&G Services Ltd.

"I am impressed by how many topics are covered, including many less-common problems..." Andrew Binstock reviewing the Fourth Edition in Oracle Java Magazine

Java Cookbook: An Excellent Read
"The Java Cookbook is arguably the best book ever written on the Java programming language..."
Jack D. Martin, Computer Scientist, reviewing an earlier edition on Barnes & Noble.

"I learned more in two days with this book than I did with several very good Java books because I need to see examples and how things work in context. If you're like that too, you'll love this book. I pack it with my laptop so I'm never without it when I need it -- it's that useful to me!"
Bruce Van Horn, reviewing an earlier edition on Amazon.com

"The most useful Java book of them all"
Stuart Wain, reviewing an earlier edition on Amazon.com

News...

Fifth Edition released March, 2020. Just a few more weeks!

Fourth Edition released March/April, 2020. The eBook was released in March and the printed book in April.

Now available in Lots of Languages... Too many to list here. See the language links in the navigation bar. Be aware that most of these are for older editions of the book.

You can sign up for a low-volume mailing list to be notified about book news and events.

-- Ian and the Java Hen Gang