tags:

views:

3115

answers:

16

Java is really vast and I want to start learning it. What is the best approach to start from scratch? Should i start with core java? And does any one knows any site/free e-book that explains each and every concept of Java with the help of examples?

I have stressed on site/free e-book as i want to learn along with working.

+1  A: 

Sun's website have a comprehensive set of training courses.

There is even one for people with a minimal amount of prior experience.

Strike that they cost mega bucks, try this instead it's their java tutorial.

Omar Kooheji
+12  A: 

By far your best bet is Head First Java;

Great for learning something if your a bit green, very clear and well structured text to learn from; http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1228917990&sr=8-1

Pace
+1 for the Head First series
Don
Yeah, Head First series are one of the best.
Max
I had my first taste of Java with Head First and understood OO with it much better than all books/tutorials on C++ I have read before... ^_^ A pleasant, complete and efficient reading.
PhiLho
+1 for HF Java!! Best. Starter. Book. Ever.
kRON
I must be crazy in that I found the headfirst books kind of a scatterbrained approach. I often found myself wanting more dense information.. but all to their own.
Simucal
I really enjoyed Head first Design Patterns, but I found head first java a little too dumbed down...
Omar Kooheji
+8  A: 
  • Start here and make your hello world app

  • Go here and learn the concepts of OO programming in Java

  • Go here and do some more advanced tutorials

  • Congratulations!

adam
+1  A: 

get any java book say HEAD's First Series and begin coding

+6  A: 

Suns own tutorials are pretty nice as well. They can be used as a companion to some book (just don't buy anything that promised to teach anything in 21 days).

Joachim Sauer
Yeah, the 'learn in 21 days' books suck. I picked up a C++ in 21 days back in the late 90s. Never again will I waste my money on one of them.
invenetix
Actually, I found that "Learn Java 6 in 21 days" was quite a good introduction to the language. Of course, you won't learn everything about Java in just 21 days, but you do get a good starting point from which you can move on and read more complex, in-depth books.
Sandman
+2  A: 

It's not free, but I started with the book "Just Java", by Peter van der Linden. I started with that book because I enjoyed his C book "Deep C Secrets" so much, and I wasn't disappointed. He's a good writer and his asides and footnotes are fun.

Paul Tomblin
That is indeed a great book. Well written!
Ruben Steins
+2  A: 

You might want to take a look at this site: Introduction to Computer Science using Java

It covers all the groundwork and has exercises and includes pop-quizzes.

Ruben Steins
Wow, this looks very useful, thank you!
JDelage
+4  A: 

If you already have some experience of another programming language. Thinking in Java is good book for you. You can find the free ebook http://www.mindview.net/Books/TIJ/.

rguo
This is great Book. I like it so much!
Polaris
+3  A: 

Best way to learn any language is to have an idea for a program, and then simply try to write it. It's much better to learn by doing, with some goal in mind.

izb
+1  A: 

Consider looking at the BlueJ IDE, its designed to help beginners grasp the concept of OO programming through the visualization. Its used in many universities across the glob and has a book to accompany it.

www.bluej.org

karl

Karl
Hey did you know that StackOverflow allows displayname collisions?
Karl
+1  A: 

I second the Head First Java proposal. It isn't free, but well worth the money. A book isn't incompatible with working, is it?

Beside, the BlueJ suggestion is a good one. There are alternatives.
The DrJava is "a lightweight development environment for writing Java programs. It is designed primarily for students, providing an intuitive interface and the ability to interactively evaluate Java code.". Slightly more lightweight than Eclipse... Good for quick testing.
I love also Processing. It is based on Java (hiding some tedious parts) and offers a simple access to a graphics library, making easy to make interesting, rewarding small programs (called sketches) with immediate visual feedback.

PhiLho
+3  A: 

Bruce Eckel's "Thinking in Java" is a great book and previous versions are available for free download here.

bcash
thanks bcash...it looks good
Samiksha
+1  A: 

You are correct that Java is a vast language when you include all of the libraries, frameworks (both Sun's and third party, such as Spring). It is a daunting task to learn it all.

The first question you should ask yourself is what programming background you have. If you know another language and have some programing experience, and entry level tutorial will be boring.

If Java is your first language (it is a reasonably good first language choice). Then I would suggest starting with one of the older versions of Bruce Eckel's Thinking In Java. The third edition is free on his site here: http://www.mindview.net/Books/TIJ/

The Java Tutorials located at: http://java.sun.com/docs/books/tutorial/index.html are an okay place to start as well, but they do not give you much programming background.

If you want to pay for a book, the Head First Java book is very good, as is the current version of Thinking in Java.

DaveCarlson
+1  A: 
  1. Get a Java Introduction book.
  2. Get a decent programming editor. My favorite for Java is JCreator, but I would use ConTEXT in a pinch. You'll probably want something with Brace Folding and Syntax Highlighting and you'll need an editor with a Command Line so you can compile your projects within your editor via the Java compiler.
  3. Experiment. Create small projects to learn interesting ways of doing things and that will give you a reasonable idea of the kinds of things you can do with Java. Example program: A console menu template that you can reuse for a variety of different projects.
  4. Involve yourself with a Java community, either on the Java site itself or elsewhere.
Dalin Seivewright
A: 

If you are new to Object oriented programming, you should definitely start with Thinking in Java by Bruce Eckel; free & online at http://www.mindview.net/Books/TIJ/. I think first 8 chapters should set you pretty well on learning OOP. (I have not read head First Java, so cant comment; though Head First books are generally good.) Then get your hands at Head First Design Patterns, which will widen the horizons.. And certainly, start a hobby project or something.

Akshay
A: 

Steps

  • Learn general programming constructs
  • Learn OO principle
  • Lean Java by syntax
JRomio