Home - Java

Click for larger image Head First Java, 2nd Edition

Head First Java, 2nd Edition

Price: $23.43 $44.95

& 2-Day * Free Nationwide Shipping! (* details)

Availability: Usually ship in 24 hours if sold by Amazon.com

Buy from amazon.com

Product Details

Binding:

Paperback

EAN:

9780596009205

Label:

O'Reilly Media

Feature:
Publisher:

O'Reilly Media

Studio:

O'Reilly Media

Editorial Reviews

Learning a complex new language is no easy task especially when it s an object-oriented computer programming language like Java. You might think the problem is your brain. It seems to have a mind of its own, a mind that doesn't always want to take in the dry, technical stuff you're forced to study.

The fact is your brain craves novelty. It's constantly searching, scanning, waiting for something unusual to happen. After all, that's the way it was built to help you stay alive. It takes all the routine, ordinary, dull stuff and filters it to the background so it won't interfere with your brain's real work--recording things that matter. How does your brain know what matters? It's like the creators of the Head First approach say, suppose you're out for a hike and a tiger jumps in front of you, what happens in your brain? Neurons fire. Emotions crank up. Chemicals surge. That's how your brain knows.

And that's how your brain will learn Java. Head First Java combines puzzles, strong visuals, mysteries, and soul-searching interviews with famous Java objects to engage you in many different ways. It's fast, it's fun, and it's effective. And, despite its playful appearance, Head First Java is serious stuff: a complete introduction to object-oriented programming and Java. You'll learn everything from the fundamentals to advanced topics, including threads, network sockets, and distributed programming with RMI. And the new. second edition focuses on Java 5.0, the latest version of the Java language and development platform. Because Java 5.0 is a major update to the platform, with deep, code-level changes, even more careful study and implementation is required. So learning the Head First way is more important than ever.

If you've read a Head First book, you know what to expect--a visually rich format designed for the way your brain works. If you haven't, you're in for a treat. You'll see why people say it's unlike any other Java book you've ever read.

By exploiting how your brain works, Head First Java compresses the time it takes to learn and retain--complex information. Its unique approach not only shows you what you need to know about Java syntax, it teaches you to think like a Java programmer. If you want to be bored, buy some other book. But if you want to understand Java, this book's for you.

Customer Reviews

I really wanted to like this book. I bought the Head First book on design patterns and love it. It was the right mix of irreverance and information. So, I bought this book even though I have been a Java developer for over 5 years. I was excited to see how the Head First authors handled a beginners book for Java.

Not too well, in my opinion. Chapter Three, in particular, was a mess. This chapter introduces the notion of variables yet never explains what an integer variable is. No explanation is given of the float type. We are told that a byte holds 8 bits...but not told what a bit is. We are not told how to assign a hexadecimal value to an int. We are not told that if we assign a numeric value with a leading zero...the compiler will assume that you meant to use octal values. The reader is not told that Strings are immutable. These are all things that will trip up a beginner (the target market for this book). The author of this chapter doesn't even bother to mention that a Java array uses a zero-based index.

Both primitives and the notion of classes are introduced in Chapter Three. Yet, the author doesn't mention that all primitives (except boolean) have wrapper classes. Strings are introduced...but, no mention is made of the StringBuffer or StringBuilder (very useful and often used classes). These items are included in the back of the book in Appendix B.

There are so many things left out that I wonder if the publisher actually had any beginners read this book. Readers of this book will finish this book still ignorant of many Java essentials.

Here is one of their dumbed-down explanations for an object reference:

"Think of a Dog reference variable as a Dog remote control. You use it to get the object to do something (invoke methods). An object reference is just another variable value. Something that goes in a cup. Only, this time, the value is a remote control."

Huh? Granted, they had been using the "cup" metaphor before...but, still I found this book confusing, superficial, and somewhat insulting. It felt like reading a children's Weekly Reader book. (It even has crossword puzzles)

I like the idea of making learning fun. However, in their attempt to make it fun they left out so much info which is pertinent to the beginning Java programmer. Apparently, another rule of the Head First series is that there MUST be a cute picture on every page. Many times, the logical flow of text is hindered because they had to fit a non-illuminating, unnecessary graphic on the page. Many of the pictures are unnecessary and do not help to explain the content at all. Many paragraphs are confusing, unclear, or simply badly structured. The editors were asleep on this one.

Many newbies are giving this book high marks. Unfortunately, they are woefully ignorant of the fact that this book left out a ton of info that is pertinent to actually coding Java well. One poster here raves that he was able to cover 60 pages in one day. In my opinion...ease of reading is not the only criteria for a good programming book.

My recommendations for Java beginners: Beginning Java by Ivor Horton or Core Java by Cay Horstmann.
I am only 12 years old, and struggled to find a java book that would teach me the language without assuming that I had previous experience with programming. This book was the answer. It was a quick read, and the pages flew by very quickly. The visually enhanced text made learning as close as possible to fun. I would reccommend this book to all who have little to no programming expierience, because it does cover some basic topics that are common to all languages.
I like writing reviews on technical books because I think they are of enormous value to those considering buying the book. I buy a lot of books online and the reviews that I read are by far the most important thing that influences my decision to buy. Or not.
I also like to read what others before me have written. In this case - and for all of the "Head First" books I have read - I heartily agree with what virtually all others have written: these books are a great way to learn complicated, and oftentimes boring, subject material.
So I won't rehash what others have already written, except to say that if what you read was good - believe it.
I think the most important thing I can say about this book is that I agree with what Hye Nyoun Eum Kim wrote: NOT for beginners. I remember thinking to myself throughout the book that a fair, or at least some, amount of Java knowledge would be necessary in order to understand what the authors were covering.
If you already know Java and want to know it better, buy this book. If you are new to Java, and especially if you are new to programming, I still recommend buying this book. But do yourself a favor - check out other introductory Java books and buy one of those as well. A good starting point? I have bought the "Just Java" (by Peter van der Linden) books ever since Java 1.0 came out.
This book was written in an entertaining way using various tools (jokes, pictures, surprises, quizes, games, etc) keeping the reader's mind engage in learning difficult concepts.

This is in accordance of the Head First's learning principles which are:
1. Make it visual
2. Use conversational and personalized style
3. Get the learner to think more deeply
4. Get and keep the reader's attention
5. Touch their emotions

I teach Object Oriented Programming, and I use some of the illustrations from this book in my class. My students love it!
I've been a professional programmer for years and I had to learn Java fast to stay in my current engagement. The "Learn-Java-In-24-Hours" style books had appealing titles but instead I decided to try this weird, truly different approach to learning because O'Reilly published it. (I have been familiar with O'Reilly for years and always recognized them as a top-flight publisher, although their books often had a formal, college-textbookish tone that made them better reference books than read-thru books.) I was put off by the graphics-intensive comic book style when I paged through the sample on-line at Amazon but decided to give it a try.

I think they're really on to something here. I can only speak for myself, as someone who already has a background in programming, but I believe the book actually works. Over a couple weeks I read the book, did the little puzzles and exercises which the authors were so insistent that I do, and was really surprised at the depth of knowledge I came out with at the other end.

Sitting in a developer's meeting yesterday I was really surprised that, while I clearly didn't have the years of experience the other coders had, I had no problem keeping up and was even able to contribute. I'm now moving in to the new assignment fairly well and am confident that I'll be able to pick up the details of this language now that I've got such a good grounding from this book.

I've now ordered the companion O'Reilly volumes on Enterprise JavaBeans and Design Patterns and am curious to see if they can maintain the same level of quality. Those skills would really seem to set a programmer apart, a critical consideration in a world where the competition is getting better (and unfortunately cheaper) every day.
That's my opinion in a nutshell about the Head First Series of computer books. I like this book, and the other 3 that I own, a lot. I didn't give it 5 stars because this review is for you. People learn differently and have expectations to meet their needs. This book is informative, interactive and upbeat. It provokes thought and problem-solving by continously prompting your brain to give input. When you're done - you know Java and a lot of subtle nuances.

I realize this is a "soft" review. There are some hardcore people who want to know "will it talk about this or that?" The simple answer is "yes." It begins by assuming you've done some programming, not just HTML. It's jammed tight with important information. So if you use a highlighter, put it down and get a paint brush. This is not a "linear" book written for the person who wants to read and memorize references. Java is a language and its taught by engaging the reader into a mental dialogue. It's fun. You won't fall asleep. You'll learn a lot. But more importantly, you'll remember even more.

How can you go wrong with a tech book that has code, ducks and Java crossword puzzles? Better know your stuff baby or read the book because it comes with a mantra, "Release Your Code." How did it work for me? Shh...5 stars!
This is an excellent book. I used this book in conjunction with the free online Java tutorials provided by Sun Microsystems. The book introduced me the concepts, and the tutorials solidified them while giving me added breadth and depth. I was a complete noob to Java prior to reading this book. My background: I had taken a class in C and one in C++ as well as read a book on C++. The way the book is presented is excellent for visual learners (like me). I'm now reading Head First Design Patterns; also very interesting.
This book, as well as series, goes a long way to helping you learn. The concepts may not always be well enough explained. However, this is understandable is it is apparent that the collaborative authors seem to do all that they can to make the teaching and learning of the concepts fun.

I would highly recommend this book to any one who is just getting started with programming. I tried to learn Java through a number of other teach myself methods. It was not until I read Head First Java that I actually got it. Since then, I have moved on to more advanced concepts and have had a lot of fun with coding. Unfortunately, most books that deal with teaching development read like someone's thesis. Bates and Sierra have provided a book that is not only a very effective teaching tool but also a whole lot of fun to read. I wish all cerebral subjects were taught this way. If you like fooling around in the library, then you will love Head First Java and the Head First series!
After reading a great book titled "Thinking in Java (JAVA 1.4)" by Bruce Ekcel. That book is so far the best book I have read on JAVA so far. It has TONS of information and for the most part the author does a very good job in explaining the information. However my main complaint with the TIJ book was that it was very hard to read at times due to the author's writting style.

I ordered Head First Java to fill in some subjects that didn't quite stick from reading Thinking in Java and just to basically get a second perspective of the language from another author.

This book does an excellent job in explaining JAVA concepts and the authors' fun writing style make it easy to follow along. The pictures make concepts easier to grasp. The code in the book works for the most part but there are some errors in the code, however if you have been following along they are easily caught.

As others have mentioned this book does not cover EVERYTHING on JAVA 5. Off the top of my head, I can tell you that this book does not explain ANONYMOUS inner classes or reflection. This book however does enough to get you started writing JAVA apps and has made some concepts that didn't quite stick with the TIJ book easier to understand.

This should not be your ONLY JAVA book because some things ARE left out that would make some of the program more robust. A perfect example of this fact is that annonymous inner classes are not taught in this book, which are very good for coding actionListeners for GUI components. But with that being said, this book should definetely be one of your first because many of the topics they do go over are taught very well. Once you finish this book you should be more comfortable with the more "advanced" books like Thinking in Java which is also a greak book as I have already read the 1.4 edition. After finishing this book, I plan to read Eckel's Thinking in Java (JAVA 5 edition) book next and I suspect it will be easier to follow along.

You do need a little programming experience to be able to get the most out of this book as it assumes you already know some things.

For what this book is supposed to do it does an excellent job and has been the best JAVA book I have read so far as far as presentation is concerned.

I also got Head First Patterns and am eager to read that book as well.

Stay away from the Learn JAVA in x minutes/hours books! If you want to learn JAVA the right way, go with Thinking in Java by Bruce Eckel AND the Head First book.
I have played with the Java language off and on for over a year now and have not been able to find a book that I would say helps me learn the language. I have had two Java classes and the books were, in my opinion, worthless. I wish I had titles for them. They were physically bulky and also very wordy.

I have had this book, "Head First Java, 2nd Edition" for about two weeks now and absolutely love it. I recommend reading everything before the first chapter because it offers great information about reading habits and how to get the best out of the book. The material in the first three chapters has been very easy to grasp and the code in the book is fun to play with. This book is also Java 1.5/5.0 ready.

Also, java.sun.com has a great java tutorial and I also recommend reading this as a free source. Always nice to have a good book though.

I recommend this book to any upcoming Java developer, even current developers will love it. It would definitely been in the top 5 java books, period.
This is an outstanding introduction to Java. I've done VERY basic programming in procedural languages but had a need to get some object-orientation. This book explained all the things that most other programming texts assume the reader knows and understands. To top it off, it did it in an entertaining manner.

The analogies are great and while the authors frequently repeat the same concepts several times, each time they do it from a slightly different angle. I need the repetition so this method saves me from having to read the book multiple times.

I first purchased the Head First EJB book but the authors clearly point out in the early chapters of that text that you really need this book first. They weren't kidding. If you need to get from a complete lack of Java knowledge to understanding EJBs, this book should come first, then the EJB book.

I can only hope the authors will release a book on XML and Web Services. That would complete me (for now).
I started reading this book about a week ago and am at chapter 9 now and still going. This book is great, super, well written. Plenty of funny illustrations to help the reader understand some complex topics. Covers a whole lot on object oriented programming and java (duh). My only problem with this book are the exercises at the end of the chapters. They are just too short and don;t help very much. I feel that the reader needs a lot more problems to work on, preferably ones in which he/she writes his/her own code. I have found that to be very helpful in previous C++ and UNIX textbooks. This is actually my only complaint, other than that i would highly recommend it but also recommend another book with more code as you will be done with this farily quickly (a good thing, they meke everything so understandable). Hope this helped.
If you are not already familiar with the "Head First" series of books, they are technical books on various subjects that feature an unconventional method of learning. They usually include crossword puzzles, Q&A sessions, fake conversations between different pieces of code, and even cartoons so that the subject matter will stand out in the reader's mind versus the format of a standard textbook. If you like the more conventional approach, you might be advised to stick with the old standard tutorial on Java, "Core Java" by Cornell.

The book starts out talking about the history of Java, the various versions of Java, and what is different about each one. It then goes on to explain the very basics of writing a Java application and then illustrates with the book's first so-called "serious business application" - a Java version of the song "90 bottles of beer". Of course, as is typical in the head-first series, the book codes the application up somewhat incorrectly in its first attempt and asks you to find the problem. The second chapter is an introduction to objects, their value, and how they are implemented in Java. From that point forward, for the next eight chapters or so, you are not seeing content much different from what you would see in any thorough book on the Java programming language - just a difference in presentation.

Starting in chapter 11, the book takes a series of subjects that can get involved and, as a result, often lose the reader, and makes it interesting by building a Music Machine - specifically a BeatBox Drum Machine. By building this application piece by piece the reader learns about exception handling, Java GUIs, Java Swing, and the interaction involved in all three subjects. The final chapters in the book deal with object serialization, networking and threads, data collections and generics, and releasing your code through packages and jar files. When it is applicable the BeatBox Drum Machine is toyed with to expand its capabilities and demonstrate the new concepts, but the author also shows some simpler applications to get the point across too. There hasn't been a really good book on Java distributed computing written in about ten years, and the next chapter goes over the basics of the subject for beginners. It does a good job of explaining the purpose and use of RMI, servlets, Enterprise JavaBeans, and even some Jini at a basic level.

This is a good book for someone who is just starting to learn Java, and is very suitable for self-study. However, although most people really love the head-first series, there are a very few people that just hate this approach. Thus you might want to glance at any book in the head-first series and see if this style of learning appeals to you before purchasing this particular book.
This book is unquestionably a winner in this aspect. The authors, *Kathy Sierra & Bert Bates* are both experienced java trainers and it shows in every page of this masterpiece. They have attempted a meta-cognitive style to teaching a technology subject and in my opinion, it worked well, not just because they used meta-cognition, but because they applied it correctly. But beware, since this book is geared towards beginners, experienced java programmers might not find a lot to learn from here; unless you want to do a fun revision on the subject.

The authors commence by providing a chapter full of advice about how to read this book to get best results. From there, they walk you through Object Oriented Programming. They talk about *What Objects Are*, *What is State*, *How the same behavior in different objects behave differently based on its state* etc and provide you with a very impressive primer on OOP concepts.

From there, it is all java. They cover basic syntax, powerful java library features, Inheritance, Interfaces & Polymorphism, Constructors, Math, Exceptions, Swing, Serialization, Threads, Networking and IO at a balanced level so that a beginner doesnt get overwhelmed, and at the same time they do justice to the concept as well. They skim through some of the advanced J2EE related concepts like Servlets, JSP, EJB and Jini which is understandable.

The author's portray the 80-20 rule very well by sometimes saying that, "This technique is what you will use most of the times" and "dont worry about the hard part because you might not even use it", which is really encouraging for beginners.

Overall, this book is *Java made easy* and written in such a fashion that anyone who is willing can learn java. I highly recommend it.
I cannot say more than the other reviewers put. You know what? I bought this book after reading many positive reviews from this page, but still with a doubt, how does it really look like?

When I received and opened it, I was kinda suprised. The book does not quite look like a technical book. It's more like..hmm..a novel or comic book, maybe? It's really different than all of other computer-related books I own.

Flipping page-by-page, every page has illustration, fancy bookmark/handwritten notes, and other stuff that make us really understand what the authors really try to explain. The most I love is the "There is no Dumb Questions" at the end of each chapter, which answer questions (amazingly, most questions the author had were really questions in my mind when I was reading the chapter. It's like the authors could read my mind :-). Another one is the exercise/problems.

I haven't finished reading the book, but I got addicted with this book. The authors really try hard to make their readers understand Java.
I started learning Java a few years ago, having had previous experience with C++, PL/SQL, ActionScript (Flash) and even assembly language. For some reason, even with books by Paul and Harvey Deitel, I found that I was not sure of what I was doing in Java. I could read the code and tell what a program was doing, but was having a hard time creating the new objects, interfaces and methods I needed for my project.

My wife bought this book for me and I didn't have the heart to tell her that a "silly" book on Java would not help me get where I wanted to go. How wrong I was!

The authors make it seem like they are very casual, even irreverent, about the subject. However, they actual do imbed the concepts into your mind with silly poems (roses are read, this poem is choppy, java is always pass by copy - or something similar) and crazy "debates" between objects and concepts. The light finally came on about what objects living on the heap was all about and that declaring an object variable is really declaring a reference to an object. Wow! so that's why you need an object.equals(object) method instead of just using object==object. The other books pointed that out, this book MADE the point in the brain.

I could provide lots more examples of how apparently silly games make the concepts live in your brain instead of just on the paper, but you really should experience it for yourself. I fully intend to investigate the other Head First books that are relevant to my work.
Okay so I spent almost 30 minutes looking over the reviews here on amazon and I read both the good and the bad. I drove down to the bookstore and checked out the book myself...I spent over an hour and a half in the bookstore looking through this book and here's my take: This isn't per say a "beginners" book. As a matter of fact, on page xxx of the book (yes roman numerals) it gives you three questions to answer to see whether this book is for you or not! It's NOT for people who have never done programming, only dabbled with html and what not! Also not for C++ people either.

After that, I went on ahead through the introduction only to be slightly confused. Granted it tried a little too hard to be cool at explaining java terms and concepts that I had a "Wtf are you talking about" moment.

It's a very thick book and like one reviewer said, it had way too many notes and sidenotes and sidenotes to the sidenotes that made me go, "Wait what?"

Bottom line: If you already have some sort of intro to programming and want to learn java then this book is for you. If you are an absolute beginner and have absolutely no knowledge of programming or have dabbled in it AGES ago (like me), this isn't for you. The book even says so itself. The reason why I gave it a two is because it advertises itself as if it's going to teach you java from scratch but no it doesn't. Plus the whole "cool," with cool stories and too many sidenotes and pictures and cartoons approach just doesn't cut it for me. I think it's a bit too much. I mean there's a kids computer programming book out there that I browsed through that was more sophisticated and straight to the point than this.
I wanted to get SCJA (Sun Certified Java Associate) certified, but wasn't confident with my Java syntax skills. By time I finished this book, I had alot more confidence with my programming abilities, and scheduled the exam.

This book, along with the Examscam SCJA Certification Guide, were the key resources for getting certified.
This has to be one of the most entertaining introductory texts I have read. In addition, by rephrasing key points in multiple ways, and including fun exercises, the series is one of the better ways to learn new material. Head First Java covered a vast amount of material in relatively few pages and included material that you usually don't see in other beginning books such as networking, RMI, and even mention of Jini! It also covered Java 5 topics including generics!

Over the decades, I've seen a lot of really bad habits. Many of these bad habits were learned in introductory texts. I'd therefore like to see these texts teach best practices. In general, this book seemed to do this (for example, it mentioned that implementing Runnable is preferable to extending Thread), but missed on a few accounts.

- Sequential code was shoved into methods called "go".

Tell me, what does this method do? Names such as "go", "doit", and "init" are common, but are not very informative names. Good names make your code easy to use; bad names doom your code forever to obscurity. The examples should have simply put the sequential code directly in the main method. If the code was meant to be shared, then it should have been put in a method that describes what it does (for example, createBeatBoxPanel()). See Martin Fowler's book "Refactoring" for more on this subject.

- The examples use "// close methodName" comments.

This convention was born in the bad old days when sloppy programmers created unreadable blocks that were hundreds or even thousands of lines long. Since it is far easier to read and maintain code when blocks are less than a page long, these comments are unnecessary and reduce white space (which is a far more effective separator).

- The examples used hard-coded numbers.

Never, ever use hard-coded numbers in your code (other than, say, a starting index of 0 or 1). You'll make the code impossible to decipher and prone to error. If you saw the number 31536000, would you have any idea of what it represented? Wouldn't you prefer to see SECONDS_PER_YEAR? The other advantage is for maintainability. If you had to change a value, you only have to do it in one place if you use constants. If you were to use hard-coded numbers and needed to increase your Animals array from 4 elements to 8, say, you'd have to do a global search and replace to change the places which referenced the number of Animals. When you did so, you'd inadvertently give a month 8 weeks in another part of your code.

- The examples used implementations instead of interfaces.

Prefer interfaces over implementations in method parameters and return types as well as in declarations. This keeps your code flexible. The examples included code such as "ArrayList<SomeType> cards = new ArrayList<SomeType>()". Unless your code is actually methods specific to ArrayList, it is better to change this declaration to "List<SomeType> cards = new ArrayList<SomeType>()". Later on, you can create a LinkedList without having to change the rest of your code.

- There were more typos than I'd like to see.

I would have given the book 5 stars if it weren't for these, but if you're new to Java, get this book and print this note. Then read "Effective Java" by Josh Bloch.
I have experience programming, and tried to use this to learn Java, and about OO programming generally.

I really wanted to like the book. It is (as many say) entertaining, and I like the idea behind the book (that people learn best from illustrated instruction that isn't too dense and serious).

After reading a few chapters and doing all the exercises, and some of the puzzles, I tested myself, and found that I hadn't acquired any ability to do even simple things in the language, even though I can program in Pascal well, and in C pretty well.

I switched to another book (Cadenhead's _Java in 24 hours_). At the end of that, I could do reasonable things such as write applications to find medians. I looked, also, at Weisfeld's _Object-Oriented Though Process_, which taught me about OO programming concepts. I like both these, and would recommend them.

Then I came back, and found this book entertaining, and occasionally informative. It is a slightly unsystematic tour through the Java language, with sidelights on topics you use, but which seem odd. The style is casual, but so are the explanations. I would have no good idea what encapsulation was from this book, for example.

Before I had bought the book, I would have liked to know how hard it is to use the book to actually acquire the skill of programming in Java. I regret having bought it, and would have preferred to just look through it in a library, or borrow it briefly from a friend.

Is it possible that many of these positive reviews are from people who already understand Java?
This is a good beginners' book. It is, however, 3 years old and does not cover the latest version of Java, 6.0. According the publisher, O'Reilly Media, the authors consider Java 6.0 to be similar to version 5.0 and thus not worth a new edition. The next edition is scheduled for 2010, when Java 7.0 comes out. On the other hand, the authors did not really cover all the new 5.0 features in this second edition. In particular, enum is relegated to the appendix! I am not sure how much update one can realistically expect in the 3rd edition.
This book will not be for everyone. The layout and teaching style may turn you off and that is ok. Everyone learns differently.

The book does cover a lot of ground, perhaps too much but more or less does so in enough depth to make this book attractive to novices and intermediate programmers.

I have two main complaints:

1. The GUI section is extremely weak. The jukebox is not as much of an example of writing a solid, good looking GUI as it is a 'whee look what I can do' example. Granted using Swing is a topic for at least an entire book(and I hope a good HF GUI book is in the works), but the lack of useful examples of common components and the terrible layout managers makes this a section of the book easily skipped.

2. Some of the client/server examples in the networking chapter block permantantly. It compiles fine, but it blocks forever. There is not a deep enough discussion on IO and networking to make this a useful chapter.

Other then those two quibbles, which might be very minor depending on your point of view, this is a fun, generally well-written book that anyone should be able to use to great effect.
I know only one programming language well, Actionscript. I wanted to know Java, too, to make servlets (and also because Macromedia's many tools seem to be increasingly Java-related).

I was skeptical when I flipped through this book because of its goofy diagrams, but I bought it because of its price and the many glowing testimonials in the first pages.

I'm glad I did.

The first half covers syntax, datatypes and objects. This could have been tedious, because 80% of the material covers things any programmer would already know. But the structure and the style made it pleasant enough--and interesting enough to stay awake for that other, Java-specific %20.

Then, right at the midpoint (Serious Polymorphism), the book started to really engross me.

I had read a more technical book on OOP in Actionscript (Actionscript 2.0 by Colin Moock), and put that knowledge to good use, but I was almost embarrassed to realize that the goofy examples and diagrams were deepening my understanding of the way type-safety, polymorphism, interfaces, constructors and exception bubbling actually worked.

I also became increasingly jealous as the second half laid out Java's data structures (sets, enums), inner classes, interface-driven event structure, and native networking capability. I want that.

My interest piqued, in the second half I started actually doing the exercises, too. Many of them are just variants on debugging..and what better way to learn a language than debug it? It helps the material stick.

It's remarkable how much of the book consists of WRONG turns. That is, it takes a problem-solving approach, and investigates the wrong turns almost as much as the right ones. This makes learning-by-reading much more like learning-by-doing, which also makes the material stick.

There are a few cons: some of the exercises are grating or useless (to my taste); the proofreading isn't that great; the chapter on generics was confusing...but overall, this is probably the best programming book I've read.
I was surprised at how well this book kept my attention. This is the only programming book I've ever read cover-to-cover without falling asleep. Not even once. This book is very easy to follow and understand. No need to re-read sections. Everything seems to somehow "stick" just like the book advertises. I would highly recommend this book to anyone needing to learn Java. Be advised though that there is no such thing as a "cureall" book. You will need other texts after this one. But I will say that this should definitely be your first book whether you are a complete beginner or a seasoned professional starting a new language. You won't be dissapointed.
This book is good for helping you understand the object-oriented concepts of Java. It is written in a fun style and still has lots of substance. The book assumes you are not a total beginner at programming. It is helpful especially for procedural programmers struggling to come to terms with object-oriented language design.
I have done quite a bit of programming in assembler, C, and Visual Basic. I needed to learn Java. This book goes out of its way to make itself look like it's not a serious book, but don't let the outrageous pictures fool you. This book will teach you Java. The authors do a good job of presenting concepts at a measured rate. More importantly, they present a balanced picture of Java. They include the philosophy of Java, best use practices, syntax, and sample programs all at once. I am amazed at how easy they have made it to understand what Java is from the ground-up.
The good:
+large text with many examples
+starts from the very basics and foundations/fundamentals of Object-Orientated (OO) programming practices instead of just focusing on syntax
+varied exercises to reinforce concepts
+fairly inexpensive

The less good:
- sloppy/skimpy index; hard to use as a reference book
- some of the "fun" elements get in the way of finding information fast (especially if you're already accustomed to dry programming books)
- could be thinner by cutting out some graphics
- no CD

Overall:
=worth your while if you're new to OO programming.
Ive read many java books before and most of them were so boring, especially when coming on to the Threads, IO, Collections part. It wasnt because i had no interest, its because it was presented in such a boring and dull way.

With Head First Java, Java is taught in a fun way. A way that will keep your interest and improve retention so you can actually go program things when your done reading. I read this book in 3 days. And also prompted me to buy some of the other Head First books.

Im excited about the Head first ALgebra book coming soon!

If you want to learn Java fast and KNOW how to use it. Use this book.
When you first glance through this book you will notice all of the retro pictures and half jokes. I've never read a Dummys/Idiots book on programming, but I can imagine them having the same look and feel. But then when you dig into the actual content...

This book, to me, felt like a good class on Java programming from a great professor who has real world experience - the tone is conversational and the topics selected that make the most real world sense. There are a few large "class projects" that have a very real world feel to them (a networked beatbox anyone?). Important points are pounded home. It is the class but without the text book...

The topics covered also seemed to have a "real person" feel as opposed to a textbook feel. I read another popular Java book just before this one. It threw 2 chapters on GUI basics as almost an afterthought, there was no networking, nothing about inner classes, nothing about making distribution packages, etc. In that book the basic ideas were gone over in great depth, greater than here, but these more practical topics were skipped or had the briefest mentioned.

With this book you start using Swing just a little more than half way through the book. All the topics in the last paragraph (plus many others) were covered in a practical method.

This book, however, isn't perfect. As mentioned above, this book is like a good class on Java programming without the textbook. Sometimes the textbook is needed. When I was in school I always read the textbook no matter how good the prof - it was needed to get the full benefit of the info. I also like having good reference books that I can leaf through when I have an issue. This book is a mediocre, at best, reference book and admits it.

It also often gets too cute. OK, sometimes that is needed, but it can get a little... As another reviewer mentioned, this books often seems to be aimed at collage age kids, not professional programmers. Not necessarily a bad thing - I've been out of my 20s longer than I care to admit and I never felt I was too old to be reading it.

I would recommend this book if you are just starting off in Java or are rusty and want to pick it back up. I would also recommend getting a more conventional book as foil and as a reference.
This was my first Head First book that I had bought (around Nov '09), and I have bought 5 more since (to date, May '10).
After reading this Head First Java book, I was able to teach myself java within approximately a month.

I won't comment on the specific techniques and methods the Head First series implements, but I will tell you what these books do for me:
..
I am a VERY visual and global thinker (The kind that draws things when he/she's trying to explain something, and thinks of objects/maps instead of words and sounds). As such, I like to know what there is to learn about a subject before I dive in, and I don't like to sweat details until they're relevant. And that is EXACTLY what these books do; they construct a mental map of what there is to learn about a subject from the get go. As this mental map develops (simply by frickin' skimming these books, it's amazing!), you're better able to evaluate the context of things, and better apply and build upon ideas and concepts.

Now, these books are not per se good reference manuals, but that doesn't matter to me for two reasons. 1) The mental maps they paint are alone worth much much more than the price of the book (even if you don't download it illegally). 2) The 'interwebs' is a GREAT reference for programming - specifically for Java, VB, Javascript, C++, HTML, XML, etc.

I spend my free time teaching myself programming because I enjoy it so much now! .. hopefully that's not a bad thing
Java was the first programming language I learned and Head First Java was the first book I used to try and learn it. I found it funny and engaging but, more importantly, the topics stuck in my mind and I learnt the basics fast.

As this was the first programming book I had used, I was assuming that all books would be this easy to use. However, other java books are tedious, vague and confusing in comparison. I soon abandoned them and returned to Head First.

If I had to make a critisism of the book, then it would be that in the first chapter, there is a lot to take in and you may need to re-read it a few times before you move on but other than that
I found the book excellent.
People have different learning styles. If you would prefer a dense techncial manual when learning a new language this is not the book for you. I have learned languages that way and usually, early in the process, you reach a point where a key concept is only explained one way, that one way is just difficult to understand, and you spin your wheels.

The Head First approach presents the same material in a few different ways, giving the user more than one chance at achieving understanding. It is not for everyone, but I do think it is for most. As someone that knows programming, but does not know java, I was able to skip over several pages of this book, but I appreciated the graphical elements of the book when I got stuck.

I did not work in notepad (as they suggested) but rather downloaded IBM eclipse (it is free) and had work colleagues that I could ask questions of when I got stuck (important part of learning a language, IMHO). I could not make the MIDI example make a sound. There were a few other technical gaps.

I do recommend this book for most people that want to learn java. I certainly recommend it for people that find they need more than the first three chapters of the nutshell books.
I purchased this book to start learning Java as a beginner, and was very disappointed. This book is not well written to just pick up and learn Java from. Far too many of the exercises in the early chapters of the book demand previous knowledge not included in the book to complete. I regret buying this book.
I bought "Head First Java, 2nd edition" based on several good reviews here and on other sites, expecting a useful beginner book and a gentle introduction to the Java language. For a non-programmer. And to begin with things were moving along quite well. The authors want you to not use an IDE, rather type everything in notepad and then run it from the command line. This inevitably leads to some typos and subsequent compiler errors. The authors want you to see this and learn from it. Let me tell you this gets tedious after a short while. I want to learn Java, and spending excessive amounts of time hunting down typing/syntax errors doesn't help in that regard. In particular syntax errors, since they are never obvious and finding them means comparing the text in the book with what you see on your screen character by character.

But you move along, at a brisk pace, with introduction of new material every few pages. And then comes the Battleship game. Around page 135 or so. And you have to type the code, save the file, type more code, save more files, and then you realize there's an error. By design. Correct the error by re-typing one huge file. Except the error didn't go away. Start looking for errors. Can't find any. Look some more. Still no luck. Download the files from the books web site. Well, there's only two, and the second isn't being used yet. But the game will not function without some files from the previous chapter. And they don't work right anymore because you have changed things. As the book told you to do. And back and forth you go. And then you realize: you're not learning Java, you're spinning your wheels trying to sort out what the authors should have fixed in the first place.

After about four hours of this I closed the book, put it up on the bookshelf, headed out for the local bookstore and picked up "Sam's Teach Yourself Java in 24 hours, 5th edition". I'm about half way through it now, and it has been a much nicer experience.

So while "Head First Java, 2nd edition" may be a fine and useful book for others, it has been a waste of time and money for me.
Best way to put yourself to bed is read a boring technical textbook. This book is not one of those! I actually have some great Java reference books but none of them explain java concepts in such a concrete and tangible and entertaining way. Never have I ever had a book that made me laugh so hard while learning Java. I love this book, it helps to really drive home java concepts in a way that's easy to understand and it makes you laugh.
As a developer that started in the mainframe world, my transition to OO programming has been less than smooth. A co-worker suggested the Head First series and I was DELIGHTED with the presentation of information. This book presents the same information that the 10,000 other beginner-Java books present, but with stories, pictures, games, puzzles, fun dialogues, jokes and a series of challenges that stimulate your brain in a whole new way. Unlike other technical books, sitting down and reading this one cover-to-cover was a lot of FUN. Plus, I walked away with a solid understanding of many of the basics.

I now use it as a reference and refresher manual that has come in handy more than once.

The only thing I would like to see improved is that the Index in the back could be a little more comprehensive. But I can live with a mediocre Index if I walk away with a new set of skills and a ton of confidence in my new job.
What a fun and interesting book. Reading it, I feel like I re-learned Java and my approach to programming. I recommend it for all levels. I look forward to more books from Kathy and Bert.

BTW, look at "Head First Design Patterns". Same people. I thought I was a good developer before I read that one. Many of the patterns have been applied easily in my current projects.

Anything that Kathy and Bert write is gold in my book.
I like the approach the author has taken to lighten up a potentially heavy subject. I am using a number of texts in an effort to transition from COBOL and Visual Basic to Java in my career. This particular book has been most helpful in presenting the basics and in helping to making my conversion to Java a bit more enjoyable. I look forward to referring to this book often and to benifiting from other Head First titles as well.

Thank you, Kathy, for your excellent work.
I'm currently on my 8th week of my 1st Java class in college and this book has saved my life and a bunch of my hair, too. I'm a rookie in Java, so I can't give you all the in and out about Java, but all I know is that 8 weeks ago I didn't know anything about Java and today I'm coding, understanding concepts and what's going on when I see codes, most important, doing great in class, and this book has a lot to do with it.

The approach of the book to Java is great, it's fun and entertaining and most important, it shows you how to, in a day by day examples, approach and learn Java. Java is different from all other programming languages, vocabulary is not even close to other p/l, but this book makes it very friendly. I'm a lazy reader and I'm almost done reading this book, believe me this is a lot to say...

Down side, the professor did say that GUI is kind of weak and some subjects, like IO and networking are not deep enouph discussed. On the other hand, she will use it as the class book from now on. Don't even try to execute exercises if you don't have the latest version of Java, 1.5

Saying that, I 100% recommend it...

This book is simply the best programming book I have ever used. For learning Java it is an excellent reference as well as being humorous and capturing your attention to the point at which you can't put it down.

Unlike other books that drone on about one thing or another, but leave you sitting there dreaming of a nice comfortable bed (since you would be sleeping), Head First Java keeps you on the edge of your seat and laughing throughout every chapter.

It also includes mini practice activities in every chapter that will let you try out what you just learned. This hands-on approach is, in my opinion, the best way to learn the ins and outs of any programming language.

I highly reccommend this book for those learning Java programming as the last book you will need in your quest.
As an entry level software engineer, I can safely say that this book was a MUST-HAVE for me. It really has everything you need to know about Java before diving into the complex world of software development.

Concepts that are complex by nature are explained in excellent detail. The use of diagrams and examples makes this book stand out above other text-heavy books.

I would not consider myself a fast reader, but I blew through this book in 3 weeks, reading every page and completing every excercise. I only wish that I had read this sooner.
After I finished Head First HTML and CSS, I got to thinking. I was wondering if I was impressed with the book merely because I knew HTML already. Maybe I learned so fast because I had a base to start from.

So I got Head First Java. I know nothing about Java at all. I've always wanted to be able to program in Java, but I've never gotten into it, partially because I convinced myself that it's too hard, or would take too long to learn. I figured that this would be a good test of the whole "Head First" learning system.

I still like the system. I'm not a Java programmer yet, but I know enough that I can write some code, and I understand object-oriented programming much better than I ever thought I would.

This book is laid out similarly to the other Head First books. You start off with the basics, and build on everything you learn until you're writing code. The big feature of this book is how you're taught.

There's something in Head First Java for everyone. Visual learners, kinesthetic learners, everyone can learn from this book. Visual aids make things easier to remember, and the book is written in a very accessible style - very different from most Java manuals. There are similarities between this book and the HTML book (and probably with the other Head First books as well), but that's not a bad thing.

Head First Java is a valuable book. I can see the Head First books used in the classroom, whether in high schools or adult ed classes. And I will definitely be referring back to this book, and referring others to it as well.
My programming experience: I was a heck of a BASIC programmer in the day (late '80s/early '90s). I've done a very little smidgen with ActionScript/Macromedia Flash. I know some HTML, but that doesn't really count as programming (any idiot can figure out the tags). That's it.

This book does a great job at getting at the concepts behind Java. The exercises are helpful and relevant. It's a better way of learning the language than through the programming classes I've been through (although they were much in past, I doubt much has changed). For someone with very limited programming experience, like myself, it's been a great text to get a handle on Java.

However, some of the presentation is choppy. For example, the discussion of using ArrayList classes for different types of objects is broken up over a few chapters. It seems like they dive into it, don't tell you enough, go on to another topic, and then return to the original topic when you've already forgotten about it. That's why it doesn't get five stars from me. Although you have to learn things one step at a time, putting on the brakes at weird times in the instruction is awkward for the student/reader.

Still, it's a refreshing way of teaching a computer language.
If you have ever tried to teach yourself to program in a OOP language by reading a beginners book only to understand the syntax without understanding why it is done that way, this book will finally teach it to you so you really understand the logic of it. Youll never get lost or bogged down because everything is explained, you arent forced to just accept it. The only critism I have is some of the code exersizes are a little complicated. The pool puzzels in particular are too difficult to be worth trying to figure out. Im half done with the book, and I cannot say its made me a java programmer yet, but at least I have a good idea of whats going on.
I'm a software developer for more than 20 years. I did important projects using C, C++ and C# on Mac as well as PC but I never had the opportunity to use Java. Today I have. So, because I had some nice experience with 'Head First' releases in the past I picked up this book and started reading. Being quite familiar with other (OO-) languages already, it took me 10 hours to browse through almost 700 pages. Of course, I didn't do any exercise and some parts I did skip. Nevertheless I enjoyed this book very much because it presents a lot of information in such a way it never gets boring and it isn't to difficult to grasp. Although I'm already familiar with the OO terminology in this book it was still interesting to discover how Java provides these things compared to C#. The book doesn't indeed tell all details. It just tells enough: for real OO starters so that they are not overwhelmed as well as for people trying to get a good overview of an extra language. The book its style is really the Head First way. This does not need any discussion I think: you love it or you don't. Again, this book pleased me.
I took Java once in high school and I hated it. I had to take it again in college and I was getting very nervous about it, when I decided to buy this book. This totally reversed the effect of high school java. I LOVED IT. Its got a wonderfully easy going tone that teaches you the matter. Its almost like reading a comic book except you're learning and programming in Java at the same time. They give great examples that help you understand the concepts faster and you also learn how to apply them too. The beauty of this book is you don't need to know anything about java to start learning from this book. Its great for starters. It is not a reference book just like the book claims. You use it to start learning about how to use and get comfortable with java to get to the next level. I loved this book, it helped me prepare for the college course which go at a terribly fast pace. Get the book if you want to start programming in java.
This book's main specialty in my opinion is learning the language itself (versus use of language). It really helps you understand not only what is going on, but why you do things a certain way. This is what sets it apart from some of the other good Java books. However, I wish it had more real life code. A little less animals and shapes kind of stuff. It also seemed like Java generics (ArrayList<MyClassType>) was kinda thrown in at the end. Also, database coverage was lacking entirely. Since almost all real applications these days (especially business apps) use them, it is an issue to not have a good bit of coverage of them.

Pros:
Good core explanation of the language
Good core explanation of object oriented programming
Easy to read and move at a pace that you like

Cons:
Not much "real code" that you would reference later
Not many "real life" examples. Lots of animals, instead of real life uses
A little lacking in certain areas like GUI design (of course Swing is pretty weak in this area...)
Database coverage

Your best bet is to get this book and read it cover to cover to really understand Java. Then grab Murach's Java 6 book to further that understanding and see the language used in real life situations including databases. You can also reference Murach's later too since it has good code examples.
I was a little confused about how to set up the Java compiler at first. The instructions in the book were basic and unclear. The author assumed you had some experience setting up compilers already and that you knew where to save your files and how to set up your command prompt. I was lost at first, but Google told me where to get the Java Development Kit and NetBean (a Java text editor).

I would take a star off, but the beginning says that the book is intended for people who have tried at least some basic programming before. They weren't talking about HTML.

Besides the initial set up, I have had no other trouble. I've done some programming with Javascript, PHP, and just a bit of C++. I know all about variables, operators and loops, but not enough to actually do anything useful. For me, the pace of this book is perfect so far. I try to do a chapter a day, and this text is entertaining enough that I'm not counting the pages until the chapter ends.

If you want to learn Java, get this book. But if you are completely new to programming you will want to spend more time in the first few chapters. If you hit a confusing section, you can use Google and forums to clear things up.
I have been struggling for years to get the concepts of object oriented programming into my head. I have failed miserably until this book. After reading this book I finally understand things like polymorphism, encapsulation, and wrappers...concepts that all other books gloss over because the authors just presume you know what they mean. I have wasted time with a dozen other books and learned nothing. This book made it all clear to me. I have been dancing a jig ever since I got it. This is the first technical book that I would place in a top ten category regardless of topic or whether it is fiction or non-fiction. The authors are geniuses. I wish I could kiss them both and thank them for teaching an old procedural programmer how to finally get it. Hey, and learning Java was nice, too!
Although I have granted this book 4 stars -- a pretty favorable rating -- mine is another one of those dissenting opinions you will see in the current set of reviews.

I have given 4 stars because I think the Head First folks' aims are laudable; however (and this is a big however), for me the approach simply doesn't work, and I feel as though if I'd spent a little time with the book prior to ordering it I would have given it a miss.

My point here is that since it is the approach that is the real selling point here, it's worth your while trying to figure out whether the approach works for you or (as it did in my case) gives you a headache, and makes you wish for more traditional, meaning-bearing prose.

The harsh version of what I am fumbling towards saying here is that, for me, this book is the triumph of widgets. I recall a Perl 5 book from some years back that I used and liked ... but I recall detractors (the author, a really fine and well-known writer on Perl, included) saying that the book had been near-ruined with text widgets and icons and other such stuff. The Head First books, while not ALL widgets, tilt the scale massively in favor of the visual, tricky, goofy, funny [insert more terms here] approach, in a self-proclaimed effort to entertain you into learning.

There is a part of me that can grok that and applaud this, but when it comes down to brass tacks, it just doesn't work for me. And when I say "doesn't work," I am not even considering the question of whether the content is reasonably complete (other reviewers have pointed out that things may get dropped or glided over in th is process, with confusing results for learners). No, I mean "doesn't work," in the sense that I am not sure what to do with it. As an example, there are several "Code Magnet" sections in this book. The conceit is simple: mix and match these jumbled code fragments, as if they were "magnetic poetry" on a refrigerator, so that together they form a program that outputs the desired stuff.

This is a cute, attractive idea that a majority of readers can probably relate to -- but what is one supposed to do with a paper page of "code magnets." Is the reader supposed to tear the page out? type all the code in and mix it around? It doesn't appear to be in the downloadable code for the book ... OH, well it seems O'Reilly sells the code magnets, for $19.95 / set. Hmm.

Honestly, I didn't know that last fact until I started this review. I'm not trying to be awfully snarky here, but I think the whole thing would work better as an interactive CD-ROM. It's hard for the activities to reach out and grab you (crossword puzzles work okay, I guess, but their pedagogic value is pretty small) when they're confined to paper.

In short, try this thing first. If you like it, by all means go for it. I didn't like it, and I have reservations about whether it really works in its current form.
 
Share your thoughts with other customers
Create your own review