views:

276

answers:

8

I'm am looking for online tutorials/books, which assume a solid knowledge of OOP/Design patterns concepts and stress on differences (both conceptional and syntactical) between C++ and Java thus allowing for a rapid development in the latter. Thank you very much in advance, appreciate your time.

+2  A: 

The Java Tutorial.

It is kept up to date and well written. Also available in hard-copy.

I'm always skeptical about "change from X to Y" guides. Though they may help as reference points afterwards, learning a new language by coming from another one may be tricker than you think.

I think it is important to learn the new language "as designed" and to get the feel for the way to things "right" in this language and also learning its code idioms.

As a good book for experienced programmers who also want to learn about potential pitfalls of Java, I recommend Effective Java.

Gerd Klima
Effective Java is by some distance the best Java book I've ever read. It's also one of the shortest :)
Don
+1 for Effective Java. You bet me to it.
iain
A: 

When I did (sort of) this, I used O'Reilly's Java in a Nutshell. It now seems to be more like "Java in an intermodal shipping container" though, so perhaps it's not as quick anymore. I would still expect it to be decent, I think it's more reference material nowadays.

unwind
+1  A: 

If you are an experienced C++ developer, I would recommend skimming through the Java Tutorial (as mentioned by Gerd Klima). Then, just open up the Java API documentation and jump right in, feet first.

Thomas Owens
A: 

There are several books covering "Java for C++ Programmers" on Amazon.

Adrian Grigore
A: 

You definitely need a book, and there are many out there.

Beyond that, one thing that helps, IMHO, is a cheatsheet, that you can print and put up next to your monitor. As you learn stuff you can add them to the sheet.

Here are a couple, specifically for C++ programmers:

JRL
+2  A: 

O'Reilly's 'Head First' books are very well written. Take a look at Head First Java and Head First Design Patterns.

mip
+4  A: 

I moved from C++ to Java 6 years ago an used "Effective Java" by Bloch, this is a style book which explains in 50 short articles how best to use various java classes and techniques. This is very similar to "Effective C++" by Meyer and "Exceptional C++" by Sutter.

If you already know C++ and object oriented programming and can read Java this is the fastest way to write good quality java code.

There is a new edition out now with generics etc. In my mind this book is essential for all Java programmers as well as those wanting to learn Java.

iain
Beat me to it. +1
Jonas
+1 Its really amazing how everyone always agree on Effective Java ;-). Btw, you can read Java Puzzlers afterwards!
NickDK
A: 

I made this transition in 1996 or so when Java was newish. A book will definitely help. I used Laura Lemay's 21 day book, which is now up to rev 6. It took me 3 days to get through the original book and another week before I felt I was fully conversant.

Things to get used to:

  1. The language is not huge, but the support libraries are. There probably is already something that does what you want
  2. Garbage collection and sane memory management is awesome. My bug count plummeted in working with Java compared with C++
  3. Garbage collection and sane memory management sucks. I was writing performance critical applications and (at the time), I would've killed someone to get something similar to placement new or operator new overload.
  4. Garbage collection is not general resource collection (ie, open files etc). You still need to worry about that.
  5. I really missed having an integrated macro preprocessor. You can still use one, of course, but then your build has just gotten more complicated.
plinth