tags:

views:

1132

answers:

20
+4  Q: 

Learning Java

I've been doing C++ development for the last 5 years and need to pick up Java for a new job. Do you have any suggestions on books/websites/etc to help me with the transition?

+4  A: 

Sun Java Tutorials

CD Sanchez
+5  A: 

http://www.javaranch.com/ is a good place for Java study.

Here are some books that listed on the site with reviews and rating.

http://www.javaranch.com/bunkhouse/bookSearch.jsp?category=Beginning+Java

codemeit
+14  A: 

I don't think there's any better book for an experienced programmer wanting to learn Java than Thinking in Java by Bruce Eckel.

Don't let the 'beginner' language turn you off. It's top notch.

Ry4an
His name is Bruce Eckel, not Bruce Eckels.
broady
+2  A: 

I would suggest reading Thinking in Java by Bruce Eckles. Followed up by Ivor Horton's Beginning Java 2 published by Wrox. The Beginning Java 2 book covers a large part of Java and provides code samples for most things you may want to try as a beginner such as parsing XML files, etc. The Thinking in Java book is good for helping you understand the differences between C++ and Java as you can go through it pretty easily.

kings90
+10  A: 

After you get the feel of Java, I'd recommend Effective Java by Joshua Bloch.

It gets into the specifics of Java and mentions good practices and common pitfalls.

I'll also point to the question: Best java book you have read so far

coobird
Oh! Yes, this is THE book to learn Java after you've learned the basics of Java.
Ubersoldat
+1  A: 

Head First Java from O'Reilly is a good introduction and an easy read. Since you are already familiar with OO concepts and an experienced programmer then the Java Tutorials from sun is probably the best place to start.

Vincent Ramdhanie
+3  A: 

Head First Java is the best book for learning Java. It's an introduction to object oriented programming, as well as Java, so as an experienced programmer you might be better served by Thinking in Java.

Bill the Lizard
+1  A: 

Java Concurrency in Practice by Brian Goetz is an awesome book on threads and the java.util.concurrent packages. A definite read if you'll be doing any type of threaded programming.

Spencer K
A: 

Although Java Concurrency in Practice has a lot of good content and discusses a lot of things in depth, it is not an easy book. It's written pretty haphazardly and is quite difficult to follow unless you've done hardcore thread programming. Java Threads is much better in those aspects.

talonx
Really? I thought it was written pretty logically, starting from what threads are and how they're used to coordination and locks, and deadlocking issues and debugging. I was having a very hard time with threads and found it enlightening. It's meant for the beginner, not the expert.
Spencer K
+1  A: 

Bruce eckel's free book : http://www.mindview.net/Books/TIJ/

CORE JAVA :

Effective Java, 2nd edition

http://www.amazon.com/Java-Generics-Collections-Maurice-Naftalin/dp/0596527756 -- book on java generics. nice.

Then again, more depends on whether you're going to build desktop apps or serverside apps.

Good luck with java

javaranch
infoq.com
theserverside.com
javablogs.com
jguru.com

anjanb
+1  A: 

Java How TO Program by Deitel and Deitel

askgelal
A: 

There is a dozen books on market, which are written by old C++ developers, which are now code in Java, such as above mentioned Thinking in Java by Bruce Eckel, also good one is Java 2 Ivor Horton Wrox Press. My general suggestion is to read book, that is made by some C++ developer, such as you. It's more intuitive for you to read those books.

vaske
A: 

I used Herbert Schildt's "Java 2 Complete Reference" and "Java Black Book" by Steve Holzner.

I learn new languages by reading the reference manuals over a couple days, then starting to write in them.

warren
A: 

When I was first learning/using java in school, I found Java in a Nutshell to be an extremely helpful reference book. I did most of my programming in C/C++ at the time as well. I haven't read the latest version of the book, however. I've heard it has declined in quality a bit, but I can't confirm and would still recommend giving it a shot. Lately, I use the Java APIs online for reference.

Jay Sheridan
+1  A: 

Screencast tutorials are the new hotness. Here is a great site:

http://eclipsetutorial.sourceforge.net/totalbeginner.html

Learn JAVA using Eclipse. If this site existed when I was learning Java, it would have saved me hours.

Yada
A: 

Learning any programming language requires writing code apart from reading about it. Some websites offer you the chance to solve programming exercises/problems and submit the solution and/or the code. For Java you can use JavaBat Also Project Euler and SPOJ are other alternatives.

Himanshu
A: 

i like cay horstmann's "core java" I & II http://www.horstmann.com/corejava.html

Ray Tayek
A: 

I would strongly recommend finding some resources that highlight the differences between Java and C++. This is very useful because the subtle differences can throw you off. I myself shifted from C++ to Java (a long time ago). It took me a while to reconcile to the fact that you cannot override private methods (functions) of the super (base) class.

If you can't find any specific good book on Java for C++ programmers, please look at Java Gotchas and such like.

Hemal Pandya
A: 

Believe or not, those Learn X in 21 Days books helped me learned the basics fast and catapulted me onto more advanced books and topics.

So: Learn Java in 21 Days. Never miss it. I was a Pascal Developer with knowledge in C/C++, and I learned Java fast with this book.

Also, be sure to get your hands dirty with the JDK ASAP!!! The actual experience will immerse you more learning Java.

thenonhacker
+1  A: 

Another book worth mentioning is O'Rielly's Learning Java. It provides a VERY thorough introduction and has become my de facto reference book.

Nate