Resources for C++ To Java Transition

D

DaKoadMunky

Greetings all,

I hope I am posting in the right place.

I trust if I am not you will point me in the right direction.

I am looking for any online resources, particularly message boards or
newsgroups, for C++ programmers who are learning Java.

In terms of problem solving I am first trying to map C++ language constructs
and design idioms to their Java counterparts.

In some cases it seems that there are no direct counterparts.

I would really like the perspective of people who have had to make the
transition from C++ to Java and how they dealt with what they perceived to be
deficiencies in Java. Of course I am also interested in those aspects of Java
that made C++ programmers say "Gee whiz! I wish C++ had that!"

Right now I am focusing on the core language and its support for OOD/OOP. At
some later time I will focus on elements that Java provides that C++ does not,
such as graphics and threading.

Thank You,
Brian
 
C

Chris Uppal

DaKoadMunky said:
I am looking for any online resources, particularly message boards or
newsgroups, for C++ programmers who are learning Java.

My best advice is: Forget *everything* about C++ and C, and just learn Java
from scratch.

Otherwise you're likely to miss what Java's about by trying (and failing,
badly) to write C++ in Java.

In terms of problem solving I am first trying to map C++ language
constructs and design idioms to their Java counterparts.

That's exactly what you should *not* be doing.

-- chris
 
R

Roedy Green

I am looking for any online resources, particularly message boards or
newsgroups, for C++ programmers who are learning Java.

I came at Java from C++ too. My biggest problem was presuming that
Java was very much like C++. The resemblance is much more superficial
than you would first guess.

What helped me was thinking about how the JVM works on an assembler
level. I saw that Java arrays were very different from C++ arrays. I
saw that Java's parameter passing was much simpler. I learned about
the heap and garbage collection. I read the JVM spec. You can look
all these things up in the Java glossary.
http://mindprod.com/jgloss/jgloss.html


The programming philosophy is different. Platform-independence has
massive repercussions throughout Java and its libraries. Everything is
much more rigidly specified. e.g. see
http://mindprod.com/jgloss/primitives.html


You tend much more in Java to look for canned solutions in the
libraries than setting out to create new code for yourself. Learning
Java is much less about the language and much more about discovering
the rich toolchest that comes with it.

Much as you are eager to get on with conversion, it is best to invest
some time studying other examples of code to get the hang of the Java
idioms.
see http://mindprod.com/jgloss/collections.html

Trying to convert C++ to Java vortope (word for word)
will drive you insane. You have to think in a different way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top