tags:

views:

360

answers:

8

Possible Duplicate:
Best Java book you have read so far

I am interested in learning Java and have a preference for learning from books and using online tutorials to supplement that. I'm not sure which books are considered current, much less are recommended. I saw this SO thread but it is two years old and I just wanted to see if there was anything newer that is recommended.

+4  A: 
  • Thinking in Java 4th Ed by Bruce Eckel covers Java SE 5/6 and is a great book. 4th edition e-book is available for just $25 at his site (while all past editions are free).
  • The Programmer's guide to Java certification by Mughal/Rasmussen is another good book (one of my favorites), even if you don't plan to take SCJP.
  • Head first Java is also an excellent book, if you like that style of teaching/learning.

Good online resources - JavaRanch | JavaWorld | TheServerSide | IBM developerWorks | StackOverflow

Java SE has been evolving but it's not as drastic as, say, things like Struts or EJBs. If you learn it today, your knowledge will not be useless as the next version comes out. There might be new stuff to learn, but you won't have to unlearn so much. A good book can give you a good foundation and start and online material can be used to keep up-to-date later.

Samit G.
+4  A: 

Java hasn't changed much in the past two years. JDK 6 came out in Dec 2006; update 10 in Oct 2008. It hasn't moved since then. References that are two years old are still perfectly up to date.

With that said, I'd recommend "Core Java" or "Head First Java" or "Thinking In Java".

duffymo
Not much changed. Hmm... http://en.wikipedia.org/wiki/Java_version_history#Java_SE_6_.28December_11.2C_2006.29
TheLQ
+1 for _Core Java_, especially if you already have some coding experience. I used it a few years back to pick up Java (I was mainly trained in C++ at the time), and I found it incredibly clear and concise.
bcat
"Java SE 6 Update 21Released 7/10/10" =P
Brian S
<sarcasm>Of course, java 6 is TOTALLY different to java 6! Cant wait for the new java 6!</sarcasm>Java is very conservative regarding changes. They may add new features but at a very slow pace (vs. .NET or other JVM languages).
atamanroman
@Lord Quackstar - I believe the statement is still true from the point of view of someone just learning the language. The basics aren't influenced by adding Rhino.
duffymo
+6  A: 

Head First Java: O'Reilly's page. Amazon's page, Safari Books Online page

I'm not a Java guru, but I've been dabbling in it off and on for years. Recently I got my first job where Java is required, and I've worked through part of it and it's pretty good - easily the best Java book I've seen (and I've seen several). I had to return the dead tree copy to the library, but am now (slowly) working through the online version.

As for online tutorials, the JavaRanch has some good exercises to work through and a forum where you can ask questions. Ostensibly, it's aimed at helping people get SCJP's, but it goes beyond that.

GreenMatt
The authors behind these Head First books have done a great job making learning fun. I recommend this book.
Shakedown
+6  A: 

Honestly, for programming languages, books are not the way to go. Most languages, Java being one of them, change quickly. A book will last you 6 months, maybe a year, if you buy it when it is first published and then be out of date with the latest API changes and features. It's really not worth the investment of $40-$60 that a book is going to cost you.

For Java, it looks like Oracle is updating the Java Tutorials. According to that page, they were last updated 7 July 2010 and contain features from JDK 6 Update 21. Of course, the extreme basics really haven't changed that much over the years, but I think it's always important to be as up-to-date as possible.

Another web resource that's pretty good is JavaWorld. Their information runs the gamut from beginning level Java to Java Enterprise Edition and Java Mobile Edition. I'm not sure how up-to-date all of their articles are, but it looks like they are still publishing new content.

Thomas Owens
Nice perspective on books.
neduma
Same experience, especially in Ruby!
zengr
There are plenty of java 6 books around. Without books you will fail in becoming a good programmer. Do you think that Effective Java or Effective Cpp are outdated because they are older than 6 months? Your statement may be true for a few languages moving at a crazy pace but you still have to know C# 2.0 in order to be able to get C# 4.0. Ive read so many books and it would take FOREVER to pick all these info from the net. Without books, programming wouldnt be where it is nowadays.
atamanroman
You do not need to know C# 2.0 to get C# 4.0. I didn't even touch C# until 3.0 and I didn't have a problem learning it. Although not using it on a project in the last year or so has kind of dulled my skills, that's another story.
Thomas Owens
@Thomas Owens: You have a valid point about programming languages changing quickly, but books are a valid resource for learning. At a beginner level, most basics of a language are relatively static. Some people just learn better from books. What to do if you don't have Internet access but have an immediate need to look up something? Also, there is plenty of out of date information on the web and it's often difficult to tell what is and isn't current! Finally, there are plenty of <$40 books available, including Head First Java ($30 from Amazon).
GreenMatt
+3  A: 

It depends what kind of book best suits you. If you like 'fun' books and that's how you learn best then you can probably go with Head first Java.

I'm currently reading Thinking in Java 4th edition and it's pretty good, I would recommend it. I looked at both books and the latter is much better in my oppinion.

I don't agree with Thomas Owens, as others mention programming languages don't change much, even with all the changes you can't assume every book is outdated.

Dan
Proof: Java has had releases every 1-2 years. It looks like Ruby releases every year or so. For Rails, every version breaks a lot of things or adds better ways to do something. PHP releases a new major version it looks like 2-3 years with minor versions in the middle. And Python has significant releases several times a year, with at least 2 major (as in things break) releases (the most recent in 2008). C++0x adds a ton of new features not covered by C++ books (plus many C++ programmers are also using the Boost libs more than ever). I think this shows that books are not the way to go.
Thomas Owens
That doesn't prove anything really. The fact that something new is added to the language or some minor changes are made does not prove that book are obsolete. I learned PHP 2 years ago from a book printed in 2003, had absolutely no problem.
Dan
Maybe you learned it. But you learned PHP from 7 years ago. You missed out on every new feature, function, method, and capability that modern PHP has to offer. If I hired you as a programmer because you said you knew PHP, but then I found out you knew an old version of PHP and not the latest, I would be disappointed - it was a waste of my time and yours, since now I have to pay you to learn the updates to PHP. It's always best to start as recent as possible.
Thomas Owens
C++0x is not even here, and when it comes there will have been 7+ years between the current standard and 0x. Breathtaking pace, indeed.I love books for learning languages.Of course, you seem to believe that learning languages mainly consists of learning APIs by heart and thus you count every minor release of a specific implementation(!).My mileage varies. A lot.
Thomas
Brian S
+2  A: 

I have been learning Java for a while in school, and it seems as though the most valuable resource for the coding itself is Java's own website:

http://download-llnw.oracle.com/javase/tutorial/

I'v also used Ivor Horton's Java 2 for Beginners, but I mainly use it for coding reference.

Beth Brown's A Guide to Programming in Java is also quite decent, where it doesn't only cover Java, but also programming theories and computer science in general.

But again, I am still a student.

el HO
+2  A: 

I think you should start with "Head First Java" and "The Complete Reference JAVA" by Herbert Schieldt, these are best books to start...

Darshan G. Prajapati
+1  A: 

Easy (Syntax, API, ...):

  • Head First Java
  • SCJP 1.6 (<3 Kathy & Bert)

Advanced (Style and Design):

  • Head First Design Pattern
  • Effective Java
  • Clean Code
  • TDD by Example

I really think that books are the best way to start. At this level, you dont want to hear about TDD, Scrum, IOC, DRY, MVC or whatever. You want it easy and pretty, no blabla and fast results. You dont care what changed from Java 5 to Java 6. I dont say there is no good stuff on the net (the opposite is true) but most of it doesnt aim at beginners.

As soon as you got the java basics (SCJP is a nice way to get there) you will automatically have questions which are not covered in most of the newbie books. If its about design, the advanced books I listed should cover way more than the basics you need. You will also find plenty information and nice ppl willing to help at stackoverflow or javaranch. Google tracks down about a bazillion java blogs and tutorials for you. But you need to know for what to search.

Imo thats the way to go and thats the way im going. In fact, i read many of these books before i started programming for a living. This made it VERY easy to get into this stuff. I had a decent coding style and knew many common practices already as i began as a junior programmer. The lack of practice was gone after a few month and im moving very fast. I may lack experience (and will for the next 10 years) but the seniors appreciate my broad knowledge and my ability to solve problems on my own.

By the way: I think you should stick to java. .NET is amazing but it has so many more features you dont need to know yet. Java is cleaner and easier to handle for now.

<3 books!

atamanroman
By the way: If books arent the way to go, why are all GREAT software engineers writing? Its true that books are not cool compared to fancy new media. Thats why they are for smart ppl :P Again: You wont be a amazing programmer without reading a few books. On the other hand many of the amazing programmers did survive without SO. Gotcha! ;)
atamanroman