Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
Java Cookbook, Second Edition Paperback – June 21, 2004
Windows 10 For Dummies Video Training
Get up to speed with Windows 10 with this video training course from For Dummies. Learn more.
Frequently Bought Together
Customers Who Bought This Item Also Bought
About the Author
Ian F. Darwin has worked in the computer industry for three decades: with Unix since 1980, Java since 1995, and OpenBSD since 1998. He wrote the freeware file(1) command used on Linux and BSD and is the author of Checking C Programs with Lint, Java Cookbook, and over seventy articles and several courses (both university and commercial) on C and Unix. In addition to programming and consulting, Ian teaches Unix, C, and Java for Learning Tree International, one of the world's largest technical training companies. He runs OpenBSD on most of his computers, and he runs a mirror of The Unix History Society archive.
Top Customer Reviews
To judge the quality of the recipes, I checked out some very basic and common Java problems, such as writing equals and clone methods, synchronizing threads, and comparing floating point numbers. In most cases, I found flaws in the code or accompanying explanations. The discussion of equals doesn't mention that the hashCode method needs to be compatible with it. The recipe for clone has the method unnecessarily throw a CloneNotSupportedException. The explanation of synchronizing threads says that locks are held on methods, instead of correctly pointing out that locks are held on objects. The code for floating point comparison requires that the user keep track of the magnitude of the numbers being compared.
By using the term "Cookbook" in the title, I expected to find a collection of the best standard code templates. Instead, I found code samples that merely demonstrated a basic concept, and that they serve as only a starting point for understanding Java. Together with the misleading explanations, this book has the potential for confusing beginning Java programmers as much as it guides them. This book is best used as merely a guide to get the beginning Java programmer started. The "recipes" should be viewed as started points to be improved upon -- using them as is will result in less than optimal Java code.
I heartily recommend this practical work for Java engineers. For those not familiar with the first edition this is a solid practical work that covers a wide range of Java programming challenges. For those turned off by the first edition, you should take a look at the second, the improvement is profound.
I'm impressed by how comprehensive the coverage is: 26 chapters covering such things as file i/o, Swing, RMI, applets, Java Servlets, JSP, e-mail, JDBC, XML, multi-threading... At 48 pages, the index is HUGE, just what you need to look things up!
The author assumes you know Java but not as well as you ought to! He explains all those things that I really should know but I never get around to figuring out properly: the correct handling of dates/times, internationalization, floating point numbers, etc. Thankfully, the book is concise and easy to read so you can quickly plug a bunch of gaps in your knowledge by browsing over chapters.
This book will quickly pay for itself. Enjoy.
The chapter breakdown: Getting Started; Interacting With The Environment; Strings and Things; Pattern Matching with Regular Expressions; Numbers; Dates and Times; Structuring Data with Java; Data Structuring with Generics, foreach, and Enumerations; Object-Oriented Techniques; Input and Output; Directory and Filesystem Operations; Programming External Devices: Serial and Parallel Ports; Graphics and Sound; Graphical User Interfaces; Internationalization and Localization; Network Clients; Server-Side Java: Sockets; Network Clients II: Applets and Web Clients; Java and Electronic Mail; Database Access; XML; Distributed Java: RMI; Packages and Packaging; Threaded Java; Introspection, or "A Class Named Class"; Using Java with Other Languages
For those unfamiliar with the "Cookbook" style, the chapters have a series of real-life problems, such as playing a sound file, playing a video clip, and printing in Java. The problem is followed by a short one or two line solution and an expanded discussion of the issue complete with code. This approach makes it really easy to find something that is similar to the issue you're facing and to see how someone else would solve it.
For me, the quality of this book is really high. It's a second edition covering the Java 1.5 package, so it's fully up on the current technology. In fact, the Generics chapter deals exclusively with new features in 1.5.Read more ›
Most Recent Customer Reviews
I was very happy with this item. It meet my expectations and work as described.Published 9 months ago by Gerald D Schure
I got this as a student hoping it would help in my programming class, but I was miss informed about the proper use of this book. Read morePublished 13 months ago by Tim Radtke
Great for anyone who wants clear-cut code that understand over the weekendPublished 15 months ago by physics jock
I haven't done any Java since 2000ish (when Java 1.3 was new) so I'm trying to get back up to speed. Read morePublished 17 months ago by David Scott
When I first open it, there is something like raisin on the first page, it is that disgusted! Is this like a new book?Published on June 25, 2013 by Fangyu Luo
Needed this for college. it still contains useful information but as a programmer you should start using the internet for answering your questions and not books.Published on December 13, 2012 by DB9
While the book may be very good, i only give it two starts because of the annoying author's apis and utilities that one must run in order to run the examples. Read morePublished on September 26, 2010 by Joao Coelho
I was looking for a good used book on Java programming. I read the reviews, this O'Reilly book seemed like a good choice. I bought it used, it has given me what I expected.Published on September 22, 2010 by Lee Ivy
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... Read morePublished on August 12, 2007 by Dave Walz-Burkett