Live data from Hacker News

Ask HN: Resources for learning Java?

news.ycombinator.com

1–10 of 21 posts

Ask HN: Resources for learning Java?

#1
After 2 years of coding exclusively in PHP, I'm making the transition to Java and would like your suggestions on what are the best resources for learning the language.

If you are a Java dev, I would like to hear your story. How did you learn the language? What helped you the most? Any advice you can provide is appreciated.

Re: Ask HN: Resources for learning Java?

#4
If you already have experience programming (which you do) try the following: First read the wikipedia page on the language. Download a medium-sized open source project, start at main() and try to understand what it does. Then, google for features/syntax you don't understand; read comments; have the api docs open; google for languages gotchas; google for techniques you don't understand. Once you do this enough to be comfortable with the language (Shouldn't take more than a few days), try to write something on your own. Either recreate what you already wrote or try to create something just outside what you feel is within your means.

I tend to learn languages a lot faster and in a much more thorough fashion when I approach it this way.

edit: this has nothing to do with java per se, but I find it is valuable to me when trying to pick up a new language.

Re: Ask HN: Resources for learning Java?

#7

Years ago, I used Bruce Eckel's Thinking in Java : http://mindview.net/Books/TIJ4 I liked it a lot at the time. No idea if that's the best thing out there now. I haven't seen the latest edition, as I haven't had to touch Java in several years.

That was how I originally learned Java in undergrad. I think that its a pretty good book. I think that its a great introduction to the basics. A good follow up book is Effective Java by Joshua Bloch.

Re: Ask HN: Resources for learning Java?

#8
post #2

http://java.sun.com/j2se/1.5.0/docs/api/ This got me through my college Java courses.

Seconded. I've found the Collections section to be most helpful.

Also, if you want functional programming in your collections, check out Apache's commons collections:

http://commons.apache.org/collections/

Re: Ask HN: Resources for learning Java?

#10
One such ordering is as follow:

1) Head First Java (Edition that covers Java 5) 2) Core Java (optional, latest edition) 3) The Java Programming Language 4th Ed _AND_ Effective Java 2nd Ed

The last resources are somewhat related. Some of the stuffs in TJPL can make EJ clearer and vice versa.

Post reply on HN