The best books for learning Java for beginners are:-
1- Beginning Java 2 by Ivor Horton
This book is a pretty good introduction to Java, especially for beginners.
2- Java 2: The Complete Reference, Third Edition Patrick Naughton
This book is the best of the lot for beginners. It presents OOPs concepts very well in the beginning and gradually takes you into Java and how Java implements the various OOPs concepts previously discussed. I was also comfortable with the pace of the book.
3-Beginning Java Objects: From Concepts To Code, Second Edition by Jacquie Barker
These first dozen chapters provide an introduction to object modeling, which every Java programmer, if not every object-oriented software developer, should understand fully. This is where the fundamental concepts of abstraction, classes, object instantiation, method invocations and even inheritance are first introduced, only to be re-introduced as Java-specific syntax later on in the book.
4- Beginning Programming with Java For Dummies by Burd
The chapters are very easy to follow, well-written, and engaging. Much easier to understand these CS concepts having read this book than my other Java book.
Here the list of the best books for intermediate and advance Java books (Java programmers).
1- Effective Java (2nd Edition)
2- Head First Java, 2nd Edition