TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Resources for learning Java?

7 pointsby stanleyover 16 years ago
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.<p>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.

15 comments

yanover 16 years ago
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.<p>I tend to learn languages a lot faster and in a much more thorough fashion when I approach it this way.<p>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.
评论 #399939 未加载
mechanical_fishover 16 years ago
Years ago, I used Bruce Eckel's <i>Thinking in Java</i>:<p><a href="http://mindview.net/Books/TIJ4" rel="nofollow">http://mindview.net/Books/TIJ4</a><p>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.
评论 #399855 未加载
hello_motoover 16 years ago
One such ordering is as follow:<p>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<p>The last resources are somewhat related. Some of the stuffs in TJPL can make EJ clearer and vice versa.
tjrover 16 years ago
I've not done much Java for a while, but my most useful resources have been <i>The Java Programming Language</i> and <i>The Java Developer's Almanac</i> (especially the code samples, which I believe are available somewhere on java.sun.com).<p><i>Effective Java</i> is also a great read for becoming a "better" Java programmer, but may or may not be useful to you right off the bat.
ObieJazzover 16 years ago
<a href="http://java.sun.com/j2se/1.5.0/docs/api/" rel="nofollow">http://java.sun.com/j2se/1.5.0/docs/api/</a><p>This got me through my college Java courses.
评论 #399858 未加载
rwover 16 years ago
Try searching any question like this with "X for Y programmers". Example:<p><a href="http://www.google.com/search?q=%22java+for+php%22+programmers" rel="nofollow">http://www.google.com/search?q=%22java+for+php%22+programmer...</a><p>These results aren't as good as some, such as "Java for Lisp programmers". It's a useful heuristic, anyway.
bretthoernerover 16 years ago
I'm kinda doing the same thing but from Python. I really liked Java Precisely <a href="http://www.itu.dk/~sestoft/javaprecisely/" rel="nofollow">http://www.itu.dk/~sestoft/javaprecisely/</a><p>It doesn't try to teach you programming, it just cuts to this "this is what this is in Java" ... high signal/noise.
johnyzeeover 16 years ago
Sun's own Java Trails online tutorials are very good. They cover a lot of ground with minimal blabbering (unlike books whose authors are paid by page count).<p><a href="http://java.sun.com/docs/books/tutorial/" rel="nofollow">http://java.sun.com/docs/books/tutorial/</a>
flashgordonover 16 years ago
On a different note why? no, really... apart from enterprise development why would you want the headache...<p>(by the way, ive done java since 98 up until couple of years ago when i switched to python...)
critkeover 16 years ago
Start with Hello World and try stuff: <a href="http://www.javacoffeebreak.com/java101/java101.html" rel="nofollow">http://www.javacoffeebreak.com/java101/java101.html</a>
zupatolover 16 years ago
I learned a lot from the java tutorial<p><a href="http://java.sun.com/docs/books/tutorial/" rel="nofollow">http://java.sun.com/docs/books/tutorial/</a>
stuartkover 16 years ago
Take a look at <a href="http://www.javapassion.com/" rel="nofollow">http://www.javapassion.com/</a><p>Some nice tutorials on several aspects of Java.
brlover 16 years ago
You might like dzone.com which is a link/news site for developers that has a huge bias in favor of news about Java.
krisneuharthover 16 years ago
Learning Java from Oreilly was a good start for me and continues to be a decent reference as time goes on.
comsterover 16 years ago
Just goto any US university teaching Comp Sci
评论 #400417 未加载