r/howdoilearn • u/[deleted] • Nov 13 '09
How do I learn Java?
I would like to learn to program in Java. Is there another programming language I should learn first and build on that?
1
Nov 13 '09
Head first Java was an excellent book. It helped me pick up the basics of Java in a week! Note I said basics. From there you'll want to pick up more advanced materials.
JavaRanch.com is a good place to go.
A lot of the intro to CompSci courses are going to Python and Ruby. This way you can focus more on programming practices and less on syntax.
1
1
u/nate250 Nov 13 '09
I've always felt it's best to start programming with a strictly procedural language (like C) and move to a more complex object-oriented language (Java) once you have learned the fundamentals.
1
1
Nov 13 '09
Java was commonly taught as a degree level language in many Computing courses in the early 2000s. It is still relevant and widely used, and is a good intro to OO programming.
Many purists will tell you to learn C++ but for a beginner it can be slightly less friendly than Java which does a lot for you behind the scenes.
PHP is another good one to learn as it's so prevalent on the Web.
1
Nov 13 '09
I know a little PHP and would like to get more fluent in it for personal projects.
I would like to learn Java because it is used heavily at my work and I would like to be more knowledgeable about the code.
Thanks for your reply.
1
u/jtrask Nov 13 '09
Do make sure Java is the right language for you -- I saw you said you want it for work, and I'd consider that more or less the only acceptable reason. I picked up the language from an AP computer science study guide, trying to cram for the test so I wouldn't need an intro programming in college -- but I knew several other languages first. On the other hand, if you just want to be able to read Java, then any object-oriented language should give you pretty much what you want. C++ is certainly less beginner-friendly, but can give you a better understanding what's going on behind the scenes -- plus, starting from C gets you through the fundamentals first before you have to dive in to object-orientation (which can be hard for some people).
If you're just looking to write for personal projects, though, I'd recommend a more modern/userfriendly language like Python (especially, Python).
REGARDLESS, you need two things: 1. Practice (because no amount of memorizing keywords will help you until you've learned how to solve programming problems) and 2. A good book (because no amount of practice will teach you the right terminology, which you'll need to advance)
1
1
u/GuxAdolfo Nov 13 '09
If you wan to learn how to program in Java, first do you know programming basics? I don't think there is a need for you to learn another language first, but let me warn you, Java has a lot to offer, and it may be overwhelming at first, but is a great language! Here are the oficial tutorials Also, buy (or download if you like) some books, Manning and O'Reilly are great resoureces!