# What is the best book for learning Java?

**URL:** <https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592>\
**Category:** In My Humble Opinion\
**Created:** [September 13, 2006, 7:37pm UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592 "2006-09-13T19:37:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hajario](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hajario/32/171_2.png) [@hajario](https://boards.straightdope.com/u/hajario)\
**Post date:** [September 13, 2006, 7:37pm UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592/1 "2006-09-13T19:37:51Z")

</div>

I haven’t programmed in a while. To give you an idea, I first learned FORTRAN in school and taught myself c from a book several years later. I would like to learn Java now.

What is a good book that I can use to teach myself to program in Java? I first need to understand this whole newfangled OOP thing so I am looking for a good theoretical introduction first. I also would like to learn through examples so lots of good problems are important to me as well.

Thanks.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [September 13, 2006, 11:56pm UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592/2 "2006-09-13T23:56:34Z")

</div>

When I go to learn Java, which will likely be relatively soon, I intend to pick up a book called something like “Algorithms and Data Structures in Java”. It makes sense for me because I’ve already been through a similar book in C++ (my native language, so to speak), and it might make sense for you because knowing basic data structures is very important for dealing with anything but a small program.

After you’ve gone through that, take a look at [this book](http://www.amazon.com/Introduction-Object-Oriented-Programming-Timothy-Budd/dp/0201760312/sr=8-1/qid=1158191702/ref=sr_1_1/104-0130187-7147160?ie=UTF8&s=books) for a discussion of object-oriented programming. It’s not a very theoretical book, but the discussion of how multiple languages work goes a long way towards making it clear why your particular language works the way it does.

---

<div class="post-metadata">

**Author:** ![yoyodyne](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yoyodyne](https://boards.straightdope.com/u/yoyodyne)\
**Post date:** [September 14, 2006, 1:13am UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592/3 "2006-09-14T01:13:06Z")

</div>

[Thinking in Java](http://www.mindview.net/Books/TIJ/) is a good book to start with, as well as free.

---

<div class="post-metadata">

**Author:** ![Dervorin](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dervorin](https://boards.straightdope.com/u/Dervorin)\
**Post date:** [September 14, 2006, 5:48am UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592/4 "2006-09-14T05:48:55Z")

</div>

[QUOTE=yoyodyne]  
[Thinking in Java](http://www.mindview.net/Books/TIJ/) is a good book to start with, as well as free.  
[/QUOTE]

Seconded. He leads you through the whole process, and while I found his examples to be somewhat longwinded and not really helpful (especially the discussion on data types, which is about three pages of very similar code, and terribly confusing to parse, especially for a new person) in general it’s a good book. Can’t beat the price, too.

---

<div class="post-metadata">

**Author:** ![SlowMindThinking](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@SlowMindThinking](https://boards.straightdope.com/u/SlowMindThinking)\
**Post date:** [September 14, 2006, 3:22pm UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592/5 "2006-09-14T15:22:12Z")

</div>

I like “Agile Java” by Jeff Langr. It can be used to learn both Java and agile programming techniques. I’d ignore the bits about Ant, though. Just download Eclipse and run through the book.

---

<div class="post-metadata">

**Author:** ![ratatoskK](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ratatoskk/32/2987_2.png) [@ratatoskK](https://boards.straightdope.com/u/ratatoskK)\
**Post date:** [September 14, 2006, 3:30pm UTC](https://boards.straightdope.com/t/what-is-the-best-book-for-learning-java/372592/6 "2006-09-14T15:30:07Z")

</div>

I used “Java in a Nutshell” years ago and thought it was great.
