

Best book to study Java - umangd

I have prior experience in C/C++ and want to study JAVA. There are tons of books out there. I am looking for one that teaches the basics as well as gives practical knowledge.. any recommendations?
======
6ren
It's getting old, but the early editions of O'Reilly's "Java in a nutshell"
(by David Flanagan) books were targeted specifically at C/C++ programmers
learning Java. In my opinion, it's extremely well-written, being correct,
clear, concise and engaging.

From the 4th edition (which was for Java 1.4), it bulked up from 1 inch thick
to 2 inches, and stopped _specifically_ targeting C programmers. It's still
good, just not as good. Also, since then, Java has added generics, annotation
and several other things. Some of these (esp. generics) have a widespread
impact on coding. Also, it doesn't cover the ecosystem. But if you want to
start with the basics, it has them.

For an introduction to the basics of the _language_ , in terms of C, the
earlier editions can't be beat. (your local university library will have
several copies - chapters 2 _How Java differs from C_ and 3 _Classes and
Objects_ are what you need)

~~~
ramblerman
I have no experience going from c/c++ to java, but I would highly recommend
starting at java 1.5 or above.

The differences between 1.4 and 1.5 were quite profound

------
xtx23
I believe that you can't really learn Java through reading. You'd better
served if you try to port some of your old code to Java so you have a purpose.
Java's spec can span to thousand of pages, so an overview book can be either
too thick or too shallow. I would recommend you reading a Data
Structure+Algorithm book in java, which will cover all the basic use and
unique characteristic of the language: [http://www.amazon.com/Data-Structures-
Algorithms-Java-2nd/dp...](http://www.amazon.com/Data-Structures-Algorithms-
Java-2nd/dp/0672324539)

------
pk137
Java Precisely (Sestoft) gives you the crispiest syntax. Effective Java
(Bloch) gives the best practices. Core Java (vol 1, 8th ed) gives you a
pro-C++, no-nonsense comprehensive coverage. Official Java Tutorial is the
best intro, save it's not a book!

------
thuang513
I love the Head first series books. Even though I already had experience with
other languages when I started, Head First Java explained things clearly and
enjoyably! <http://amzn.to/ybDBJv>

~~~
whostolemyhat
I can't recommend Head First Java enough - initially I thought it was too
whimsical and lacked depth, but it goes over key points simply and repeatedly
until you understand them. If you have OOP experience then a lot of the first
half of the book will be pretty familiar, but it's useful enough for the
syntax/quirks etc

~~~
brudgers
The Head First Series is "Learn the Hard Way" backed by modern educational
theory - hands on, engaging multiple learning pathways, and offering problems
at various levels of difficulty even on relatively advanced topics.

They are structured based on ideas about how people learn rather than ideas
about how they should learn.

That's not say that "Learn the Hard Way" is not useful or that I don't admire
what Zed Shaw is doing. I think it is really good work.

~~~
frenchfries
+1 for head first java, I also recommend effective Java once you've read hfj

------
liva
Thinking in Java by Bruce Eckel is a great book and teaches you not only the
"What"s and "How"s of Java but also the "Why"s. <http://amzn.to/o2lVx0>

------
limanoit
If you come from C background, you already have basic java syntax. You just
need to know the library. I think you should read "Effective Java". Imho, It
is one of the best books I have ever read.

------
arunkashyup
Best thing to do is watch videos on youtube!!

