First book I really like which helped me to clear lot of concepts about Java, So it is one of the best book to buy to learn Java.
Head First Java
This book is unconventional but is very enjoyable to learn. It is the best Java book for beginners which help them to learn Java in very easy manner and understand the concepts more deeply. The exercise and puzzle section makes really interesting to learn Java. Best part I like about this book is the "There are no dumb questions" section which is included in every chapter. It helps to clear some doubts in understanding the topic. So this makes Head First Java a very entertaining yet motivational book to learn Java.
It is no doubt best Java book for beginners.
Head First Object Oriented Analysis and Design
If you really want to know how object oriented analysis and design works or you are keen to make your thought process while programming more object oriented then this is must book for you. Complex analysis and design techniques are so much simplified in this book which makes this book a really one of the best book to buy to learn Java. So anybody who wants to write more maintainable or reusable code then you need to buy this book and start reading it. This books contains really a simplified explanation of composition over inheritance, why programming for interface is better and many more.
Thinking in java
Thinking in Java is again a complete book to learn Java language. Examples given for each concept is the best part of this book and this makes it one of the best book to buy to learn Java. New topics such as generics, annotations are covered in this book. This book also can easily used as a reference book. This is also a best Java book for beginners as this book is very organized and have lots of exercises in this book which helps to practice and understand more clearly.
Head First Design Patterns
This is another gem of a book. This is again a best Java book for beginners who want to explore design pattern. This book is all about how you apply object oriented programming concepts while you code. In each chapter this book explains the problem, what is the solution and why we are applying this pattern to make code more maintainable and reusable. Each chapter has exercises and puzzles which makes learning these complex concepts easier. As always I like the "There are no dumb questions" section which makes topic more clear. So if you want to buy a book for learning design pattern then it is one of the best book to buy to learn java. This book covers almost all the design patterns which are explained in simple language and with bullet points. This is the book which will take you to the next level of coding which will definitely help you to write a code which is of top quality, maintainable and reusable.
This is the best book to read if you are the professional Java Programmer. This book is from one of favorite java authors Joshua Bloch. This book as name suggest teaches you how to use Java programming language more effectively so this makes it one of the best book to buy to learn java. The explanation provided in this book is excellent and which makes it a top class Java book. If you are seasoned programmer in java I would recommend this book to you. Item based structure of this book helps you to read the book in short time intervals. This book also helps you to understand best practices about the reflection, serialization, enum and many more. So dont wait, get this book and start reading, this is really good book to learn Java.
Java puzzlers is also a very different but very effective Java book I have come across. This is the book from Joshua Bloch with Neal Gafter. This books is important read because it explains many corner cases and pitfalls in Java language. This book is different and has many puzzles which makes you to think and understand Java language more You may find many of these puzzles often included by the interviewer in his/her questions to test the knowledge. So if you like to solve or understand corner cases, like to solve puzzles then this is a must read for you. These things makes this book one of the best book to buy to learn java.
Refactoring: Improving the Design of Existing Code
This is one of my favorite book recently. As you code more and more then you might need to improve design of the existing code. I have been in such need, so I come across this gem of a book. This book has dozens of tips to improve the code which you will find definitely beneficial. Each topic in this book explains problems in implementation and applying the correct solution. There is one chapter in this book called as "Bad smells in Code", this chapter I found really interesting and I am sure you will find it too. I am sure this will change how you view the code and help you tremendously to make tired old code to a better code. So if you are experienced programmer and want to get rid of old and bad code without affecting the external behavior of the code, then get this book right now.
Java Generics and Collections
This is another my favorite book because it helped me a lot when I was struggling to understand Generics in Java and various types of collections. This book really helped me to understand collections which is really important part of day to day coding and interview too. Collection in Java is today the most hot topic asked in interviews. As this book is dedicated to Generics and Collections you will get good idea about both the things so it is one of the best book to buy to learn Java. This book is written by Maurice Naftalin and Philip Wadler and I am really thankful to them for helping me to understand Generics and Collections in better way.
This book contains explanation of each Collection interface such as List, Set, Queue and Map. Most important thing is the compare part which shows how each collection performs in different situation. So if you want to master in Java Generics and Java Collections then go and get this book and have it as part of your Java books.
Concurrency Practice in Java
If you are struggling to get your threads correct, then this is the book for you. This book explains basic concepts of thread safety and concurrency, ways to build and compose thread safe classes, performance optimization tips etc. It also includes some advance concepts such as non blocking algorithms, automic variables etc. This book really helped me to gain good understanding about the threading and how to apply in Java. It also helped me to understand best practices to improve performance of the code. This makes it a really a one of the best book to buy to learn Java. This book is for who uses threads regularly and care about performance issues. Simple and clear explanation of concurrency makes this book as one of the best Java programming book.
This is one of the best Java programming book if you care about performance. As you progress to the senior level as a programmer, performance tuning is added as a part of coding and thought process. This book is all about the performance monitoring, tools to monitor it, profiling etc. If you are finding hard to understand what is Java Heap , how exactly the garbage collection works, how the JVM works etc. then this book has explanation to all which will clear your concepts. Only thing is before reading this book you should have some experience in Java programming, which will help you to use this book in better way. So if you are concern about he performance then this is must read book.
Thus we have seen some of the books, I am sure you will find best book to buy to learn Java from these books.