Java Magazine, Nov/Dec 2017
ORACLE COM JAVAMAGAZINE NOVEMBER DECEMBER 2017 07 I love recipe books Judging from the popularity of resources such as StackOverflow the thirst for working chunks of code that correctly handle a discrete task is nearly insatiable The big diference between most online sites that ofer code solutions and a book such as Ken Kousens Modern Java Recipes is the latters sustained quality of the content the detailed explanations and the ability of one recipe to reference another for developers who dont entirely know what to ask for The other benefit of a recipe book is that the contents are laid out sequentially so that variations on a theme are grouped together and you can compare different recipes to obtain a deeper understanding of a problem The success of a recipe book rests on the knowledge and diligence of the author In Kousen a Java Champion you have a very knowledgeable developer who is equally expert at presenting the information There are 74 recipes in 300 pages which shows the level of detail and background that accompanies every recipe A common limitation of recipe books is that you dont remember them when you have a problem they cover or conversely you consult them but they dont address the question you have The better books carefully identify the scope of their contents This is done in this volume in the subtitle Simple Solutions to Difficult Problems in Java 8 and 9 in other words recipes for the added features in these two releases of Java And in fact this is what you have the basics lambdas method references functional interfaces the java util function package consumers suppliers predicates and functions streams comparators and collectors optionals the java time package parallelism and concurrency and a chapter on Java 9 s additions A useful addendum is an 18 page appendix that focuses on understanding the complexities of generics in recent releases of Java Surely they are now as complex as function declarations in C and C Consider Listing 1 from Kousens book which itself is taken from the Java 8 documentation This appendix which saves Kousen from explaining generics syntax repeatedly is a remarkably clear and thoughtful presentation of a topic that doesnt get enough attention For expert developers it will serve as a good refresher I like Modern Java Recipes a lot and can find little to fault Any developer working through the subtleties of the features added in Java 8 and Java 9 will find this book a great help Andrew Binstock java books MODERN JAVA RECIPES By Ken Kousen Listing 1 static T U extends Comparable super U Comparator T comparing Function Super T extends U keyExtractor
You must have JavaScript enabled to view digital editions.