The Java Tutorials have been written for JDK 8.Java教程是为JDK 8编写的。Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.本页中描述的示例和实践没有利用后续版本中引入的改进,并且可能使用不再可用的技术。See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.有关Java SE 9及其后续版本中更新的语言特性的摘要,请参阅Java语言更改。
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.有关所有JDK版本的新功能、增强功能以及已删除或不推荐的选项的信息,请参阅JDK发行说明。
So far, this lesson has focused on the low-level APIs that have been part of the Java platform from the very beginning. 到目前为止,本课程的重点是从一开始就属于Java平台的低级API。These APIs are adequate for very basic tasks, but higher-level building blocks are needed for more advanced tasks. 这些API适用于非常基本的任务,但更高级的任务需要更高级的构建块。This is especially true for massively concurrent applications that fully exploit today's multiprocessor and multi-core systems.这对于充分利用当今多处理器和多核系统的大规模并发应用程序尤其如此。
In this section we'll look at some of the high-level concurrency features introduced with version 5.0 of the Java platform. 在本节中,我们将介绍Java平台5.0版引入的一些高级并发特性。Most of these features are implemented in the new 这些特性中的大多数是在新的java.util.concurrent
packages. java.util.concurrent
包中实现的。There are also new concurrent data structures in the Java Collections Framework.Java集合框架中还有新的并发数据结构。
java.util.concurrent
provide thread pool management suitable for large-scale applications.java.util.concurrent
提供的执行器实现提供了适用于大规模应用程序的线程池管理。ThreadLocalRandom
(in JDK 7) provides efficient generation of pseudo-random numbers from multiple threads.ThreadLocalRandom
(在JDK 7中)提供了从多个线程高效生成伪随机数的功能。