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发行说明。
Lesson: Language Basics课程:语言基础
You've already learned that objects store their state in fields.您已经了解到对象将其状态存储在字段中。However, the Java programming language also uses the term "variable" as well.然而,Java编程语言也使用术语“变量”。This section discusses this relationship, plus variable naming rules and conventions, basic data types (primitive types, character strings, and arrays), default values, and literals.本节讨论此关系,以及变量命名规则和约定、基本数据类型(基本类型、字符串和数组)、默认值和文字。
This section describes the operators of the Java programming language.本节介绍Java编程语言的运算符。It presents the most commonly-used operators first, and the less commonly-used operators last.它首先显示最常用的运算符,最后显示不太常用的运算符。Each discussion includes code samples that you can compile and run.每次讨论都包括可以编译和运行的代码示例。
Operators may be used in building expressions, which compute values; expressions are the core components of statements; statements may be grouped into blocks.运算符可用于计算值的建筑表达式中;表达式是语句的核心组成部分;语句可以分组到块中。This section discusses expressions, statements, and blocks using example code that you've already seen.本节使用您已经看到的示例代码讨论表达式、语句和块。
This section describes the control flow statements supported by the Java programming language.本节描述Java编程语言支持的控制流语句。It covers the decisions-making, looping, and branching statements that enable your programs to conditionally execute particular blocks of code.它涵盖了使程序能够有条件地执行特定代码块的决策、循环和分支语句。