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发行说明。
This trail covers the fundamentals of programming in the Java programming language.本教程涵盖了Java编程语言编程的基础知识。
➤ Object-Oriented Programming Concepts面向对象编程概念 teaches you the core concepts behind object-oriented programming: objects, messages, classes, and inheritance.教您面向对象编程背后的核心概念:对象、消息、类和继承。This lesson ends by showing you how these concepts translate into code.本课程最后将向您展示这些概念如何转化为代码。Feel free to skip this lesson if you are already familiar with object-oriented programming.如果您已经熟悉面向对象编程,可以跳过本课。
➤ Language Basics语言基础 describes the traditional features of the language, including variables, arrays, data types, operators, and control flow.描述该语言的传统功能,包括变量、数组、数据类型、运算符和控制流。
➤ Classes and Objects类和对象 describes how to write the classes from which objects are created, and how to create and use the objects.描述如何编写从中创建对象的类,以及如何创建和使用对象。
➤ Annotations注释 are a form of metadata and provide information for the compiler.是元数据的一种形式,并为编译器提供信息。This lesson describes where and how to use annotations in a program effectively.本课程介绍在程序中有效使用注释的位置和方式。
➤ Interfaces and Inheritance接口与继承 describes interfaceswhat they are, why you would want to write one, and how to write one.描述接口是什么,为什么要编写接口,以及如何编写接口。This section also describes the way in which you can derive one class from another.本节还描述了从一个类派生另一个类的方法。That is, how a subclass can inherit fields and methods from a superclass.也就是说,子类如何从超类继承字段和方法。You will learn that all classes are derived from the 您将了解所有类都是从Object
class, and how to modify the methods that a subclass inherits from superclasses.Object
类派生的,以及如何修改子类从超类继承的方法。
➤ Numbers and Strings数字和字符串 This lesson describes how to use 本课程介绍如何使用Number
and String
objects The lesson also shows you how to format data for output.Number
和String
对象。本课程还介绍了如何格式化输出数据。
➤ Generics泛型 are a powerful feature of the Java programming language.是Java编程语言的一个强大功能。They improve the type safety of your code, making more of your bugs detectable at compile time.它们提高了代码的类型安全性,使更多的bug在编译时可以检测到。
➤ Packages包 are a feature of the Java programming language that help you to organize and structure your classes and their relationships to one another.是Java编程语言的一个特性,可以帮助您组织和构造类及其相互之间的关系。