views:

1365

answers:

35

Assuming an experienced software developer fluent in many languages, but having not entered the Java world from the ground floor, which single book related to the huge space that is the Java world would you recommend as a decent overview from which further expertise can be developed?

+12  A: 

Bruce Eckel's Thinking in Java:

http://www.mindview.net/Books/TIJ/

BobbyShaftoe
+1. for the free resource. 4th Edition print is here:http://www.amazon.com/Thinking-Java-4th-Bruce-Eckel/dp/0131872486/
Mitch Wheat
I can't really stand Eckel's writing style. He takes himself way to seriously.
PEZ
This book seemed OK for me until I stumbled over his "The copy constructor" contemplations (2nd edition Appendix A). Apparently He believes that there is no "slicing problem" in C++. But maybe he just does not know C++ :-)
Maxim Vladimirsky
Downvoted, the book is wayyyyy too long.
Click Upvote
"... the language of the world-wide web", that's a bit much
Steve Kuo
Thinking in Java is too long? It's not "See Jane Run" or something like that but that's kind of a weak version to downvote. Perhaps it's mroe of a book for grown ups. :)
BobbyShaftoe
I'd say that if it's to be a SINGLE book, it can't be too long.
PEZ
It's a great book *BUT* there are some seriously misleading sections in the concurrency chapter. (And it would be nice if he split it into 2 volumes though.)
Jason S
The code samples are utterly bad.
kungfoo
+4  A: 

How about Java in a nutshell by David Flanagan. I really like his style of writing and explanation.

Khnle
There is a newer edition that covers Java 5.0: http://www.amazon.com/Java-Nutshell-5th-David-Flanagan/dp/0596007736/
Spoike
There is, but at 1254 pages, it ought to be renamed 'Java In A Very Big Nutshell'!
Pourquoi Litytestdata
+19  A: 

Effective Java by Joshua Bloch. It's freaking good. If you were to chose a single book on programming, in any language, this would be a major candidate.

EDIT: Follow takacsot's advice about using Sun's online introduction. Then buy the Effective Java book. You'll never regret it.

PEZ
While this is an excellent book, it's not a good book for someone "entering Java".
cletus
Yes it is. Especially "Assuming an experienced software developer fluent in many languages".
PEZ
I agree that it is a good book, but it more or less assumes that you know Java already.
Brian Rasmussen
That's what's so refreshing with it. The threshold is easily overcome if you just fool around some with the language.
PEZ
I'd agree that Bloch's book is excellent (and a must-read for serious Java developers), but I'd also agree that it's not necessarily suitable for someone who's expecting to pick up the language. For that, I'd recommend the Sun tutorials or one of the other books mentioned.
Rob
+11  A: 

Head First Java.

cletus
Yes, I have read it without knowing Java and with superficial knowledge of OOP, and I found it excellent on both points, amusing yet serious, with good concrete examples, not skipping finer points, etc. Excellent reading.
PhiLho
I wouldnt recommend it to some who has experience from other programming languages though.
willcodejavaforfood
+3  A: 

Robocode. I know, it's not a book. But it's a damn good way to learn Java and have really fun while at it. You'll find wiki resources at that link.

PEZ
+8  A: 

No book is needed. My personal favorite is the java tutorial on http://java.sun.com. That is more than enough.

EDIT: Tutorial link: http://download.oracle.com/javase/tutorial/

takacsot
+1, i'm going through that right now. was also going to post this but you beat me!
Click Upvote
See my comment here: http://stackoverflow.com/questions/432549/what-single-book-would-you-recommend-for-entering-java#433077
DrJokepu
A: 

Object First With Java : A Practical Introduction Using BlueJ

Depending on experience this book is a brilliant introduction to both Java and Object Orientation.

Dynite
+1  A: 

Just to complete the list, a good first Java book could also be Java How To Program.

pek
+2  A: 

"The Java Programming Language" written by one of its inventors (James Gosling)

kind regards,

Jos

JosAH
A: 

I think your quest for a SINGLE book would be a little difficult :)

Assuming you are an experienced developer, you probably need some resource that gives you a starting point for various things you might be interested in. For this, I would recommend the InformIT Java reference section.

And for quick access to java code snippets, I would recommend the excellent Java2S site.

A: 

I really liked SCJP Study guide
by Kathy Sierra

Kb
+1  A: 

http://java.sun.com/javase/6/docs/api/

That is all.

jjnguy
I agree totally - the reference should be the #1 source of information. A few years old book can get easily outdated, while the official reference is probably updated to cover the latest additions. For example, a book written before generics might advocate approaches that are not feasible today.
DrJokepu
+2  A: 

I believe that Java is such a big platform that no single book can cover it all.

If you need to learn object orientation, the Head First Java book does it really well.

If you need to learn the Java runtime library (which is biiig) I'd suggest wading through the Java Tutorials from Sun.

If you need a good cookbook reference http://www.exampledepot.com/ is really nice (and is printed in a book too).

The most important thing is, however, experience. Code stuff :) Project Euler http://projecteuler.net/ has a lot of simple and challenging problems and most likely have some you'd like to do.

Thorbjørn Ravn Andersen
+1, even if it's obvious learning oo isn't needed. But thanks for those links. Neat!
PEZ
"An experienced software developer fluent in many languages, but having not entered the Java world" does not imply knowledge of object oriented programming to me. Examples: Turbo Pascal (before version 5), Basic, Cobol, C, assembler, etc.
Thorbjørn Ravn Andersen
+1  A: 

Has anyone read Introduction to Java Programming by Y.Daniel Liang? It's what I use, and it's quite a good book with plenty of detail.

Jean Azzopardi
A: 

As you have previous programming experience, and thus don't need an introduction to control structures, object orientation etc, I would recommend Java Precisely, which is a very concise reference to most of the Java langauge.

Henrik
A: 

I love this one: http://www.cs.princeton.edu/introcs/home/

Masi
A: 

I'd suggest the free online training courses from Sang Shin on JavaPassion.com with or without homework, just how you need it.

Peter
+2  A: 

Head first java book by Kathy Siera & Bert Bates.All the books in head first series are very very good.

BlackPanther
+1  A: 

Learning Java by Niemeyer and Knudsen. (O'Reilly rules!!!!)

Jason S
+24  A: 

Effective Java.

http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=sr_1_1?ie=UTF8&s=books&qid=1243023794&sr=8-1

GreenieMeanie
This is an excellent book - but it's not for learning either Java or Objects - it's for learning elusive best practices in java (and avoiding anti-patterns), primarily after you learn the core language.
Jared
I gathered from the original question that the poster is already familiar with Objects (since C++) and that learning the Java syntax is something he didn't want to read a book on.
GreenieMeanie
Why did this get more votes than the other Effective Java answer, which beat it by four months?
Michael Myers
+1  A: 

Effective Java, second edition. The second edition covers generics and other features added in the 1.5 language revision.

Paul Morie
+2  A: 

This may be ancient now days, but I really liked Thinking in Java. It was a number of years ago but was freely available.

Tom Hubbard
+11  A: 

My situation was similar to yours. I tried a couple of different books and settled on Thinking in Java by Bruce Eckel.

It assumes you know basic programming and some programming language terminology.

Kevin Beck
Just to complete your answer:http://mindview.net/Books/TIJ4
bgbg
I added a link to the free online edition, but be aware that there is a 4th edition that covers topics up to Java 1.5. This is really what I consider the best Java book for experienced programmers, with Effective Java being the best book for experienced *Java* programmers.
Bill the Lizard
Seconding the Thinking in Java recommendation. I'd then follow up with Effective Java (second edition).
Dave W. Smith
+3  A: 

Rather than third the excellent recommendations for "Effective" and "Thinking", I'll add "Java Concurrency In Practice" by Brian Goetz. And "Pro Spring" because I think Spring is terrific.

duffymo
Pro Spring has some terrible reviews on Amazon.
Martlark
I have the first edition and it's not bad. I haven't read the 2nd myself. Doesn't change my opinion of Spring.
duffymo
+8  A: 

Effective Java Second Edition and Java Concurrency in Practice

adrian.tarau
Again - both excellent books, but not good for learning Java or Objects (both are topics the original asker will need to learn long before he needs specialty info on best practices and concurrency.)
Jared
"... I want to learn Java, but almost every book I pick up starts with teaching the rudiments of programming ..."- I think this means he know enough about OOP :)
adrian.tarau
A: 

Java Concurrency in Practice is excellent, assuming you're interested in concurrency. It assumes quite a bit of prior knowledge about Java though so as suggested should probably be a companion to some of the other recommendations (TIJ, EJ etc).

bm212
A: 

Agile Java by Langr is excellent if you also want an intro to Test Driven Design and the basic agile approach.

Rob Scott
+1  A: 

You might consider reading the Java Language Specification, it is quite readable as specifications go.

starblue
I think you would want to wait until you are more familiar with Java before trying to tackle that....
GreenieMeanie
I did that in 2001 with the 2nd edition and didn't regret it. It depends on your experience and whether you can stomach such relatively dry stuff. The advantage is that you get the information from the source, and you know where to check when in doubt.
starblue
A: 

5 intermediate to advanced I follow and recommend are Pragmatic Programmer (Thomas,Hunt) Applying UML and Patterns (Larman) Computer Algorithms (Baase, Van Gelder)
Object-Oriented Software Engineering (Dutoit,Bruegge) Computer Graphics (Baker,Hearn)

A: 

In addition to Effective Java and JCIP.

The Java Power Tools book

Fortyrunner
A: 

Lots of answers here point to great books about Java topics (concurrency, best practices, etc), but coming from C/C++ you're going to need to learn two things:

  • Solid object oriented analysis and design (C doesn't support OO, and most C++ projects don't do objects in the same way that Java does objects.)
  • The Java language itself

The best books I've found for this are:

At some point rather quickly in your Java progression, you're going to have to start "getting" OO design patterns (especially if you're not used to thinking that way.) These two might help (but ultimately only experience will really do the trick):

Jared
A: 

Consider Java in a nutshell

It has a chapter "Java syntax from the ground up" for which the description reads "Programmers with substantial experience with languages such as C and C++ should be able to pick up the Java syntax quickly by reading this chapter". Many other chapters are relevant as well.

Bruno De Fraine
A: 

Effective Java 2nd Edition(May 2008)

tranced_UT3
A: 

In a similar situation I went for Peter van der Linden's Just Java 2.

This book covers the language itself (types, operators, statements), key libraries (e.g. threads, collections, IO, etc.), an introduction to gui programming, databases and JDBC, servlets and jsp, xml. It's still just under 800 pages.

I quite like the author's writing style. It's authoritative -- a lot of text to go through, but each chapter ends with a "Some Light Relief" section which contains humorous Java related anecdotes. Wholeheartedly recommended.

bromfiets
A: 

I suggest you read the source in src.zip, esp the packages java.* and javax.*

Peter Lawrey