Documentation

The Java™ Tutorials
Hide TOC
Language Basics语言基础
Trail: Learning the Java Language

Lesson: Language Basics课程:语言基础

Variables变量

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.本节讨论此关系,以及变量命名规则和约定、基本数据类型(基本类型、字符串和数组)、默认值和文字。

Operators运算符

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.每次讨论都包括可以编译和运行的代码示例。

Expressions, Statements, and Blocks表达式、语句和块

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.本节使用您已经看到的示例代码讨论表达式、语句和块。

Control Flow Statements控制流语句

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.它涵盖了使程序能够有条件地执行特定代码块的决策、循环和分支语句。


Previous page: Previous Lesson
Next page: Variables