Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Java Cookbook

Rate this book

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.

829 pages, Paperback

First published January 15, 2001

35 people are currently reading
213 people want to read

About the author

Ian F. Darwin

18Ìýbooks3Ìýfollowers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
35 (21%)
4 stars
62 (38%)
3 stars
48 (29%)
2 stars
11 (6%)
1 star
5 (3%)
Displaying 1 - 6 of 6 reviews
Profile Image for Rob.
AuthorÌý2 books429 followers
October 10, 2014
Ian Darwin's Java Cookbook is out and it's a great resource for developers working in Java that are out there and scratching their heads asking "How would I go about...?"

The thing that makes Java Cookbook stand out is its comprehensive scope. Darwin has done an excellent job of gathering a wide array of common problems faced by Java developers and presenting solutions to those problems that are decipherable using just the language's standard library features. (Which isn't to say "ignore libraries" -- just that there are few (any?) recipes in this cookbook that require external dependencies.) By and large, the recipes are practical and are organized into sensible categories. This isn't a book that I'd recommend you read front-to-back, but if you're programming in Java, it's worth having it handy to help kickstart your thought process on a number of different problems. (Plus, 3rd edition has been updated to include solutions that highlight Java 8 features.)

In addition to the above, it's worth noting that while Java Cookbook isn't a great book to learn from, that if you have stumbled your way into Java with an otherwise solid software engineering background, that you could use it as a leg-up or crutch while you're otherwise getting up to speed.
Profile Image for Bernie4444.
2,462 reviews10 followers
December 22, 2022
Anything stamped O'Reilly cannot go wrong

At first, you cannot believe your luck. Examples hundreds of examples and they look functional. They get down to the nitty-gritty of creating, renaming, and deleting files. The book is up to date on strings and threads for scalability.

We can go on and on to create a book about this book.

However, there is no mention of signals. There is a quickie on pipes that is misleading as it ignores pipe timing of fast machines that will give misleading information; for example, all pipes start at the same time (parallel), not one at a time in a series. No information about creating or handling named pipes. Do not see any information on handling semaphores. There is a quick survey on how to handle different operating systems. What could have been a book in itself covers only a hand full of pages? You could not possibly keep up with the history of operating systems if you did not know the story ahead of time.

However, there is plenty of examples to help get off the ground for many projects. Also, some great ideas that you can use that you may not have thought of.
15 reviews10 followers
February 22, 2022
This review is for the e-book, 4th edition.

It is of pretty poor quality, especially for O'Reilly. Out of 10 random code snippets that I decided to copy-paste and try out in my IDE, about 8 did not even compile! I don't care that there's a GitHub repo that might contain fixed code! If you publish a book with code - at least have the decency to make sure your code compiles.

Many code examples belong to the 90s or 00s at best. A major overhaul is needed.
Some praise comprehensiveness, but I don't understand why the author decided to add a whole chapter on the "R" language, just because "data science is hip right now".

Two better alternatives: Java 9 Recipes, Java Coding Problems by Packt.
87 reviews5 followers
November 30, 2016
The book is pretty big, but for a first iteration over this book it can be just looked through, I suppose, just indexing the book into your mind would be enough, for further use of the solutions suggested
Profile Image for Louis.
226 reviews29 followers
July 22, 2014
What you want from a programming language cookbook is instruction on the basic tasks that are needed to form the scaffolding that you build around your application. Language teaching and references can teach you syntax and good practices. Topical books can demonstrate how to tasks in the large. But the cookbook is for the small but necessary tasks. And for me, who does not spend much time in the JavaVM ecosystem, the Java Cookbook is a very welcome addition to my bookshelf.

I spend most of my time doing scientific programming in Python and R, but I am starting to return to the JVM because of the need to deploy what I develop. But while other languages like Jython, Groovy, Scala, and Clojure exist on the JVM, to use them well means you need grounding in Java, certainly most of the instructional material assumes more than passing understanding of the JVM and the Java standard library.

I've been building a prototype application using Java as my means of re-learning Java. Where this cookbook has helped me already is in understanding better how to configure projects, more effective use of the Java data structures and I/O, and some utilities. While I know what I need to do through my experiences in other languages, and Java tutorials and references can identify the libraries and functions that I need, the Java Cookbook provides well written examples that I can use to guide me through the JVM.

There are some warts. This book (like most JVM books) seems to be written with the understanding that the readers are web programmers and I think that the discussion of the options available are filtered with that in mind. But this is a very good reference for those times when you know what you need to do, and it is not the type of thing that gets put into a tutorial.

Disclaimer: I received a free electronic copy of this book through the OReilly Blogger program
87 reviews5 followers
August 5, 2015
Good book, covered several white spaces for me.
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.