

Ask HN advice: C++ into Java programming - yoshgoodman

Hi HN community I am a student who is just starting to explore the programming world. In our course we started off by learning basic programming principles in c++.<p>As we move on we are now going to explore more, using java but we are expected to learn java by our selfs. I understand the a programmer should be able to take what he has learned and apply it to other languages easily.<p>My question is where to start to learn java? 
Any good books, tutorials, web sites or advice?
======
slysf
My advice would be to dive in. If you've learned a solid base of C++ and have
built some apps then I'd look for an open source Java app that does something
along the lines of what you've done in C++. Given the many references online
you should be able to walk through the source code and figure out how they got
to the same result. I know this is a sort of "reverse engineering" approach to
development but it really forces you to look at what they're doing instead of
the usual tutorials in programming books that bear little relevance to real
world applications. This is a great technique to use in conjunction with more
traditional learning methods (books/tutorials/websites.) Hope this helps!

------
iwwr
C and C++ are always a good languages to learn. You can code from the lowest
to the highest levels, procedurally or OO. People starting out with a garbage-
collected language would find it harder to understand memory management or
lower level optimizations. Also, as a programmer, C and C++ will provide
gainful employment for the next few decades at least. They are unlikely to
really be replaced by anything else for their versatility.

------
bloodcarter
Continue learning C++. It will teach you fundamentals of OOP. Then make
something nice and useful with C++. Make yourself feel comfortable with C++
and then try make some Android app. They have good documentation and it's fun
:)

------
FirstHopSystems
Check out "TheNewBoston" on youtube, he has a decent collection of Java
tutorials.

------
ig1
SCJP Exam for J2SE 5 by Paul Sanghera (it's designed for people taking the
cert but it's pretty good)

Effective Java (teaches you the common pitfalls) Concurrency in practice (if
you're doing multithreaded stuff)

------
BrainScraps
Although the title is a bit of a lie, I'm liking the Sam's Teach Yourself Java
in 24 Hours book right now.

<http://amzn.to/hleb3g>

------
ddkrone
If you know C++ I'm guessing you know object oriented programming and its
terminology. The only thing new to you in Java should be the syntax so start
with a template for defining a class and work your way up from there. My
background is mostly in dynamic scripting languages like javascript and ruby
but applying what I knew to learn Java was pretty easy. The only thing new was
all the extra type declarations. Don't worry about generics and the reflection
API in the beginning because once you get used to the syntax figuring out how
generics fit in your code and how to make use of them will be pretty easy. If
you're looking for extra motivation to keep you going you could try writing an
android application, that's actually how I learned it. For extra moral support
you could pick up a book but in my experience programming books get outdated
pretty quickly and the online Java docs cover pretty much everything you'd
need to know.

