We're accustomed to being able to quickly access and absorb information. We prefer five-minute videos to lengthy lectures and short articles to books. I won't say that a good programming book replaces every article — that's not the case. And it certainly doesn't replace practice. However, for me personally, a real understanding of the fundamentals of programming came after I had completed hundreds of tasks on CodeGym, read a ton of articles, and then began to simultaneously study theory, immersing myself in books. I looked for a long time for my own personal "best Java textbook for beginners in 2019". Below are several books that I have found more or less useful at various stages of my studies. Top 6 books about Java for beginners - 1

"For the little ones"

You can read the following two books when you begin your studies — in parallel with watching videos or, if you're studying on CodeGym, together with the first levels. They are suitable for people with zero programming experience, especially the first.

Head First Java

I started with this book not because I like it the most, but because it is the simplest. Many, many programmers believe that this is the best book to teach yourself Java from scratch. And it really is completely "from scratch", i.e. it's suitable for people who are only just starting and don't yet fully know what to make of this beast called programming. It came to me too late. I think that's why I wasn't able to fully appreciate it. It was a pleasure to "just read", but it took me a long time to find anything specific. It presents the material vividly, but rather superficially (it's from scratch, after all!). Many topics and essential explanations are simply not there. But my friend, who inherited my book, was delighted by it, shouting that it was not only the best Java textbook for beginners, but also a straight-up masterpiece that presents difficult material exactly as it should be. Top 6 books about Java for beginners - 2

Pros:

  • Best book for teaching yourself Java from scratch, "for dummies", written in lively language;
  • Funny illustrations and humor;
  • Explanations with real-life examples.

Cons:

  • Excessively "watered down" for people who've already started in on the topic;
  • The puzzles and exercises aren't always the best.

Herbert Schildt — "Java: A Beginner's Guide, Sixth Edition"

After looking through this reference, I thought it was well suited to people who prefer a more traditional presentation of the material than is in "Head First Java", and who are also looking for a book to learn "from scratch". The book's explanations are very detailed in places. It resembles extended documentation with excellent visual examples. For me, the author sometimes crosses a line and starts overdoing it, the reading gets boring... and then he suddenly does just the opposite — some rather difficult point is glossed over almost in an instant and you're left completely puzzled, trying to understand what you missed and where. Still, there aren't that many places like that in the book, and I know people who believe that "A Beginner's Guide" is the best Java textbook for people who don't know anything yet. Personally, it didn't seem very smooth to me. Let's say I'm starting to understand collections — instead of getting a human explanation, I'm given the task of independently creating a Set based on arrays. That's a cool task, but first I'd like to better understand what standard collections are! Although this book, like the previous one, is considered a primer for beginners, my experience as a teacher suggests that it is only good when used in conjunction with other materials: someone switching from the humanities won't find everything in it simple and clear. "A Beginner's Guide" is best for someone who has at least studied programming (for example, at a university), forgot it long ago, and also likes the author's exposition. Top 6 books about Java for beginners - 3

Pros:

  • Traditional, thoughtful presentation of the basics;
  • Good examples.

Cons:

  • There are abrupt jumps from "belaboring the point" to "mentioning only in passing";
  • A little boring in places.
By the way, Herbert Schildt has another famous book about programming: "Java: The Complete Reference". This is a completely different, more basic text. We turn to this boo nowk.

Handbooks and references

The books in this section will be useful to people already fully involved in programming in Java and are looking for books to improve their understanding of theory and practice.

Herbert Schildt — "Java: The Complete Reference, Ninth Edition"

I decided to download this book online to evaluate it and then decide whether to buy it or not. 1300 pages of text — no joke! Well, and the price is no less impressive. I did the same thing with Cay Horstmann’s two-volume "Core Java" series (more about that below). Putting the cart before the horse, I'll say that I settled on the second one. Why? Because in "Java: The Complete Reference", I saw the same shortcomings as in "A Beginner's Guide". Sometimes it drags on, sometimes it rushes through — and sometimes with too many words. This is probably the author's style, and I think it may be to some people's liking — or rather, to their thinking. In general, "Java: The Complete Reference" is a decent reference on Java. But personally, I preferred the way that the same topics were presented in a different book. Top 6 books about Java for beginners - 4

Pros:

  • A complete reference. It seems to include every topic that beginners — and not only beginners — should know.
  • Detailed explanations.

Cons:

  • Watered down (but some people may like it that way!);

Core Java, Cay S. Horstmann, Gary Cornell

Schildt's and Horstmann's books are often compared with each other. And each has its devoted fans. For me, Horstmann's two volumes are the best Java primer. They became my go-to reference during the beginning and intermediate levels of CodeGym. When I didn't understand some topic, I mainly dug into Horstmann, who clarified a lot. The series covers everything from syntax to multithreaded programming, software localization, and working with XML. It's also useful to occasionally re-read it to refresh and order your knowledge. They say even professionals find it useful... I don't know. When I become a professional, I'll let you know! Top 6 books about Java for beginners - 5

Pros:

  • Despite an impressive number of pages, not much is watered-down (unlike Schildt).
  • It contains everything that beginners need.
  • It covers Java 8.
  • Good presentation of collections and generics.
  • It goes well with CodeGym. Suppose you reach some topic, you're completing tasks, but at some point you don't understand something — take a look at Horstmann and try again.

Cons:

  • The book may seem a little dry to some;
  • There is no practice;

Timeless classic

The books I describe below can be called sacred texts for beginning and advancing "Java-heads".

Effective Java, Joshua Bloch

This is simply a treasure, not a book. It's dedicated to the language's basic principles and written by one of its authors, Joshua Bloch. You've probably already used his libraries (in Java Collections, for example). Let me say right away: apart from certain child prodigies, novices won't have use for Effective Java. It's better to first learn the syntax and get at least some programming practice — bang your head against the all, so to speak — and then take up Joshua Bloch's tome. The book is appropriate for those who want to truly understand Java, establish the proper approach to programming in this language, and understand not only how things should be done, but also why exactly. And for those who want to know OOP deeply (in theory, these are all interrelated). This book is the best reference on Java in terms of object-oriented programming. Top 6 books about Java for beginners - 6

Pros

  • A brilliant exposition of OOP.
  • Best programming practices are presented.
  • The author has an excellent knowledge of Java's inner workings.

Thinking in Java, Bruce Eckel

This book's title speaks for itself. It's another "A to Z" reference for anyone who wants to know Java! You'll find excellent clear examples that will make it clear how Java works. I find it difficult to say which is better — "Thinking in Java" or "Effective Java". I would say that Eckel is somewhat more loyal to beginners, while Bloch expects some amount of experience. I first read a chapter from "Thinking in Java" when I had just begun started on CodeGym (As I recall, one of the early levels recommended it). I didn't quite get it at the time. But after Level 10 or 12, it was a song! And, I'll say, a very useful song. I returned to it later when I came to "Effective Java". I'll say this: Bloch and Eckel talk about the same things, but in different ways and with different examples. Top 6 books about Java for beginners - 7

Pros

  • An in-depth exposition of Java principles from a professional;
  • Good for those coming from other languages — for example, there are many comparisons with C++.
  • I think you can start reading it from Level 10, and Eckel — a little later.

A few conclusions

  1. The best book for learning Java from scratch (for those who know nothing at all) is "Head First Java";
  2. The best Java handbook and reference is the Core Java series. And, of course, there's the Oracle documentation.
  3. The best collection of Java programming tasks is found on CodeGym.
  4. The best timeless classics are "Thinking in Java" and "Effective Java". These are "must reads" for anyone who has decided to really dig deep into everything, to gain a deep understanding. But you should be sure to read them gradually and with some breaks.