There are many free Java eBooks, but most are outdated or not accurate. Here’s the best 5 free Java eBooks in my collection, they are well-known, complete, updated and detailed coverage of using Java programming language. Best for Java beginners and might also good reference for experienced programmers.
P.S The order is based on my personal priority.
1. The Java Language Specification, Third Edition
Download : http://java.sun.com/docs/books/jls/
Author : James Gosling, Bill Joy, Guy Steele, Gilad Bracha
Description : Written by the inventors of the Java Language Specification. This book provides complete and detailed coverage of the Java programming language.
2. Thinking in Java, 3rd Edition
Download : http://www.mindviewinc.com/Books/downloads.html
Author : Bruce Eckel
Description : Great and recommended Java book, chapters and tutorials are posted, public review, correction.
Thinking in Java, 3rd edition is still free, but you need to pay for the latest 4th edition.
3. The Java Tutorial 4th Edition
Download : http://download.oracle.com/javase/tutorial/
Author : Sharon Zakhour, Scott Hommel, Jacob Royal, Isaac Rabinovitch, Tom Risser, Mark Hoeber
Description : Accurate and up-to-date Java tutorials, and you can download the entire Java tutorials in bundle.
4. Core Servlets and JavaServer Pages, Second Edition
Download : http://pdf.coreservlets.com/
Author : Marty Hall and Larry Brown
Description : Complete and detailed coverage of using Servlets and JavaServer Pages (JSP).
5. Introduction to Programming Using Java, Sixth Edition
Download : http://math.hws.edu/javanotes/
Author : David J. Eck
Description : Good book for beginning programmers, and might also be useful for experienced programmers.