What are the best (as in most effective) resources for learning Java?
views:
2534answers:
19This thread has good information:
http://stackoverflow.com/questions/22873/language-bookstutorials-for-popular-languages
Another post on the exact topic as well on Java books, http://stackoverflow.com/questions/26437/book-recommendation-for-java-good-practices
While there are several books that can be effective for learning a language, I find what works for me is the following:
1) Pick a small project to develop in the new language.
2) Give yourself a deadline.
3) Tell someone about your planned project, so you have a motivation to complete the task.
It depends - do you want to get start producing code NOW(tm) or do you want to learn all the aspects of Java and maybe some OO best practices while you're at it?
For a "Code, Now"-approach web tutorials are probably the best approach, and will be even easier if you have prior OO language experience.
Otherwise, I would recommend Objects First With Java. It is meant for students starting to learn Object-Oriented Programming and Java from scratch. The book provides it's own IDE, BlueJ, which is a simplified sandbox environment for making smaller Java programs that really helps when you have not yet grasped all the terms of OO-programming. Once you become more experienced you will ditch BlueJ in favor of Netbeans, Eclipse or some other "real-world" IDE, but for starters BlueJ works excellent.
Once you have completed the book (or feel you have a good grasp on Java) you can move on to some of the more reference-style books that document every tiny bit of Java, but are less accessible as you at this point will know how to approach a problem.
"Effective Java" by Josh Bloch would be my favourite Java book. It's not one for the beginner programmer, but more for someone who's migrating to Java or who wants to polish their Java.
Anyone can learn the syntax and knock up some code, but Effective Java is a series of lessons about best practices.
Another book of his, "Java Puzzlers" is also a fun read :)
Heads First Java from O'Reilly http://headfirstlabs.com/books/hfjava/
One of the best programming books I've found.
I found that the best way to learn java was to write programs in it. I took a class on java, and found the only thing that really worked for me was the programming assignments. If you're starting with a basic object oriented programming foundation you really don't need a book to teach you. I spent probably 50 hours over the course of 3 months reading the java API docs: http://java.sun.com/javase/6/docs/api/. I would recommend spending some time writing some sample programs in java, relying on the java api docs.
Head First Java is the best book for beginners. The explanations are done in a very non-technical and humorous way. This makes the book interesting to read unlike the hard core dry technical books.
Once done with Head First, you can move to Java Complete Reference which is more technical and covers all aspects.
javaranch would be the best website.
Safari by far is one of the most valuable subscriptions on earth for developing in a framework rich environment like Java.
The best way to learn any programming language not necessarily Java, is to open a book, seriously every book will do. learn the basic syntax and from than on just write as much code as you can.
if you have any question look up in the api, usually it would give you the right answer in no time.
if not just ask a question over here.
The websites that I would recommend for new users of Java are:
www.javapassion.com - a series of online courses about Java and many of the related technologies presented by Sang Shin from Sun. I found this site to be invaluable while learning JAVA and followed the coursework for the basic Java course.
www.javaranch.com - a good collection of tutorials for Java.
This is how I'm learning Programming along with Java.
I am following Free Standford's Programming Methodology Video course from here:
http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111
The course uses the following book:
You do mention how familiar you are with Object Oriented programming concepts, but I would recommend BlueJ. While this is not a book or a tutorial (look at the other answers for books and tutorials), but rather a programming environment (IDE), I would recommend it because it allows you to "code" real projects at a diagrammatic level, and then drop down into the code when needed. There are BlueJ tutorials available also.
Another very good learning site/resource for the newbie Java programmer is Herong Yang's Tutorial Books. There are lots of tutorials there on various part of the Java libraries and platform.