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?
views:
1365answers:
35How about Java in a nutshell by David Flanagan. I really like his style of writing and explanation.
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.
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/
Object First With Java : A Practical Introduction Using BlueJ
Depending on experience this book is a brilliant introduction to both Java and Object Orientation.
Just to complete the list, a good first Java book could also be Java How To Program.
"The Java Programming Language" written by one of its inventors (James Gosling)
kind regards,
Jos
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.
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.
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.
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.
I'd suggest the free online training courses from Sang Shin on JavaPassion.com with or without homework, just how you need it.
Head first java book by Kathy Siera & Bert Bates.All the books in head first series are very very good.
Effective Java, second edition. The second edition covers generics and other features added in the 1.5 language revision.
This may be ancient now days, but I really liked Thinking in Java. It was a number of years ago but was freely available.
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.
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.
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).
Agile Java by Langr is excellent if you also want an intro to Test Driven Design and the basic agile approach.
You might consider reading the Java Language Specification, it is quite readable as specifications go.
In addition to Effective Java and JCIP.
The Java Power Tools book
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:
- Thinking in Java (Eckel)
- Java: How to Program (Deitel and Deitel)
- Head First Java (Sierra, Bates - for a lighthearted approach)
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):
- Design Patterns (Gamma, et al - the academic version)
- Headfirst Design Patterns (Freeman, et al - the lighthearted, more recent, version)
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.
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.
I suggest you read the source in src.zip, esp the packages java.* and javax.*