The Definitive Guide to Java Platform Best Practices–Updated for Java 7, 8, and 9
Iv Java Concurrency In Practice 13.4. Choosing Between Synchronized and ReentrantLock 176 13.5. Read rwrite Locks 176 Summary 178 Chapter 14 - Building Custom Synchronizers 179 14.1. Managing State Dependence 179 14.2. Using Condition Queues 183 14.3. Explicit Condition Objects 188 14.4. Anatomy of a Synchronizer 189 14.5. AbstractQueuedSynchronizer 190. Java Futures in practice The thieves keep designing the plan and they consider using Java Future to improve it. Note how this post doesn’t cover the alternative of using plain Java Threads ( implements Runnable, t.start, etc.) to solve this problem.
Java has changed dramatically since the previous edition of Effective Java was published shortly after the release of Java 6. This Jolt award-winning classic has now been thoroughly updated to take full advantage of the latest language and library features. The support in modern Java for multiple paradigms increases the need for specific best-practices advice, and this book delivers.
As in previous editions, each chapter of Effective Java, Third Edition, consists of several “items,” each presented in the form of a short, stand-alone essay that provides specific advice, insight into Java platform subtleties, and updated code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.
The third edition covers language and library features added in Java 7, 8, and 9, including the functional programming constructs that were added to its object-oriented roots. Many new items have been added, including a chapter devoted to lambdas and streams.
New coverage includes
- Functional interfaces, lambda expressions, method references, and streams
- Default and static methods in interfaces
- Type inference, including the diamond operator for generic types
- The @SafeVarargs annotation
- The try-with-resources statement
- New library features such as the Optional interface, java.time, and the convenience factory methods for collections