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发行说明。
In any nontrivial software project, bugs are simply a fact of life.在任何非平凡的软件项目中,bug只是生活中的一个事实。 Careful planning, programming, and testing can help reduce their pervasiveness, but somehow, somewhere, they'll always find a way to creep into your code.仔细的规划、编程和测试有助于减少它们的普遍性,但不知何故,在某些地方,它们总会找到一种方法潜入到您的代码中。This becomes especially apparent as new features are introduced and your code base grows in size and complexity.随着新特性的引入以及代码库的大小和复杂性的增加,这一点变得尤为明显。
Fortunately, some bugs are easier to detect than others.幸运的是,有些bug比其他bug更容易检测。Compile-time bugs, for example, can be detected early on; you can use the compiler's error messages to figure out what the problem is and fix it, right then and there.例如,编译时错误可以在早期检测到;您可以使用编译器的错误消息来找出问题所在并立即修复它。Runtime bugs, however, can be much more problematic; they don't always surface immediately, and when they do, it may be at a point in the program that is far removed from the actual cause of the problem.然而,运行时bug的问题要大得多;它们并不总是立即出现,当它们出现时,可能是在程序中与问题的实际原因相去甚远的地方。
Generics add stability to your code by making more of your bugs detectable at compile time.泛型通过在编译时检测更多的bug来增加代码的稳定性。After completing this lesson, you may want to follow up with the Generics tutorial by Gilad Bracha.完成本课程后,您可能希望继续学习Gilad Bracha的泛型教程。