Best books to Learn Java 8

I often receive emails and queries asking about some good books to learn Java 8. Since Java 8 is very different from any other JDK release, in terms of language and API enhancement you really need a good book to learn fundamentals. In short, based upon my 2 years of learning and reading Java 8 books, I can say that Java SE 8 for Really Impatient is hands down the best book to learn Java 8. It covers all the essential things released in JDK 8, not just lambda expression and streams but also new Date and Time API and several other minor enhancement yet important features, which often goes un-noticed. It doesn't scare you with comprehensive detail as well and tell you what you need to know as an application developer. It's not going to teach you fundamentals of functional programming, but it will teach you how to use the map and flatMap operations.


Well, that was the short answer, the long answer is you cannot learn everything about Java SE 8 by just reading one book. You have to read a couple of books to master the new Java 8 features like lambda expression and streams.

There are much more to learn about these features than just writing a couple of lines of code. In fact, realizing all the places where you can use the functional style of Java itself takes time but getting the opinion of multiple authors really helps there. In this article, I am going to share 2 to 3 such book to learn and master Java 8.




Best Java 8 Books for Beginners and Experienced

It's been more than 2 years since Java SE 8 GA happened, the 18th March 2014 and now in 2016, I can see Java SE 8 are growing in usages. Many companies are migrating to Java 8 runtime, others have already instructed developers to code in Java SE 8 way i.e. by using lambdas, stream and method references.

If you are a senior Java developer with 4 to 5 years of experience in Java then it's high time you learn and embrace Java 8. I am sure, in coming days Java interviews will expect a candidate with good knowledge of Java 8 features. Anyway, here is is my list of some of the best Java 8 books for both beginner and experienced programmers.



Java SE 8 for the Really Impatient
As I said this is the best book to learn Java 8. It is also my general purpose Java 8 books. If you have less time and you want to learn all important things about Java 8, this is the book to refer. I don't have to remind you about Cay. S. Horstmann's writing skill, one of the best author in Java and right up there with Joshua Bloch. I have found both of them highly readable. You won't feel bored, which usually programmer do when they read technical books. It explains about lambda expression, streams, functional interface, method references, new Java Date and time API and several other small enhancement e.g. joining Strings, repeatable annotations etc. In short, the best book to learn Java hands down.




Java 8 in Action
This is another good book to learn Java, particularly the lambda expression and stream API. It is more detailed and comprehensive than Java SE 8 for the Really impatient book. Raoul-Gabriel Urma and team has done a fantastic job to explains the motivation behind these new language features and how to use them effectively in Java 8. Like the previous book, it also covers other Java 8 enhancements features e.g. date and time API, concurrency enhancements e.g. CompletableFuture. The bonus part of this book is that it goes extra steps to teach functional programming techniques to Java programmers, which is essential to use the lambda expression in Java 8.





Mastering Lambdas: Java Programming in a Multicore World
This is the expert book on lambda expression and Stream API. It doesn't cover all the Java 8 features e.g. date and time API is not covered in this book, but if you really want to understand the motivation behind lambdas and stream this is the book to read. I like Maurice Naftalin when I first read his Java Generics and Collection, another expert book on generics and collections. He is also one of the pioneer in Java 8 with his lambda faq website. In short, if you want to understand lambda a stream in detail, this is the book to refer.




That's all about some best books to learn Java 8. I think these three books are more than enough to have a decent understanding of Java 8 and all the new language features which come along. Everybody has a different approach, though, I like to read just one book from start to end and refer another book only when they read. So, when I started learning Java, I started with Java SE 8 for really impatient and then refer other two books on a topic basis. This way I get the best of all three books without spending too much time.

Let me know what is your feedback on these Java 8 books and feel free to suggest any other book which you find truly great to read.

By the way, if you are preparing for Java SE 8 certifications then you can also use these Java 8 certifications books, they are also a great source of information on Java 8 features but written according to the syllabus of OCAJP8 i.e. 1Z0-808 exams.


Other Java 8 tutorials you may like
  • 10 Example of Joining String in Java 8 (see here)
  • 10 Example of converting a List to Map in Java 8 (example)
  • 10 Example of forEach() method in Java 8 (example)
  • 20 Example of LocalDate and LocalTime in Java 8 (see here)
  • 10 Example of Stream API in Java 8 (see here)
  • 5 Books to Learn Java 8 and Functional Programming (list)
  • How to use Stream.map() in Java 8 (example)
  • How to use Stream.flatMap in Java 8(example)
  • Difference between map() and flatMap() in Java 8 (answer)
  • How to use filter() in Collections with predicate and streams (tutorial)
  • How to convert java.util.Date to java.time.LocalDate in Java 8? (tutorial)

References
Official Java 8 Tutorials


No comments :

Post a Comment