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发行说明。
How Will Java Technology Change My Life?Java技术将如何改变我的生活?
We can't promise you fame, fortune, or even a job if you learn the Java programming language.如果你学习Java编程语言,我们不能保证你的名誉、财富甚至工作。Still, it is likely to make your programs better and requires less effort than other languages. We believe that Java technology will help you do the following:尽管如此,它可能会使您的程序更好,并且比其他语言所需的工作量更少。我们相信Java技术将帮助您做到以下几点:
Get started quickly赶快开始吧: Although the Java programming language is a powerful object-oriented language, it's easy to learn, especially for programmers already familiar with C or C++.虽然java编程语言是一种强大的面向对象语言,但它很容易学习,尤其是对于已经熟悉C++或C++的程序员来说。
Write less code少写代码: Comparisons of program metrics (class counts, method counts, and so on) suggest that a program written in the Java programming language can be four times smaller than the same program written in C++.比较程序度量(类计数、方法计数等)表明,用java编程语言编写的程序可以比C++编写的程序小四倍。
Write better code编写更好的代码: The Java programming language encourages good coding practices, and automatic garbage collection helps you avoid memory leaks.:Java编程语言鼓励良好的编码实践,自动垃圾收集有助于避免内存泄漏。Its object orientation, its JavaBeans™ component architecture, and its wide-ranging, easily extendible API let you reuse existing, tested code and introduce fewer bugs.它的面向对象、JavaBeans™组件体系结构及其范围广泛、易于扩展的API允许您重用现有的、经过测试的代码,并引入更少的bug。
Develop programs more quickly更快地开发程序: The Java programming language is simpler than C++, and as such, your development time could be up to twice as fast when writing in it.:Java编程语言比C++更简单,因此,在编写时,开发时间可能是其速度的两倍。Your programs will also require fewer lines of code.您的程序还需要更少的代码行。
Avoid platform dependencies避免平台依赖性: You can keep your program portable by avoiding the use of libraries written in other languages.:您可以通过避免使用其他语言编写的库来保持程序的可移植性。
Write once, run anywhere一次编写,多处运行: Because applications written in the Java programming language are compiled into machine-independent bytecodes, they run consistently on any Java platform.:因为用Java编程语言编写的应用程序被编译成独立于机器的字节码,所以它们在任何Java平台上都能一致运行。
Distribute software more easily分发软件更容易: With Java Web Start software, users will be able to launch your applications with a single click of the mouse.:使用Java Web Start软件,用户只需单击鼠标即可启动应用程序。An automatic version check at startup ensures that users are always up to date with the latest version of your software.启动时的自动版本检查可确保用户始终使用软件的最新版本。If an update is available, the Java Web Start software will automatically update their installation.如果有更新可用,Java Web Start软件将自动更新其安装。