├── LICENSE ├── README.md ├── SUMMARY.md └── docs ├── 01-Introduction ├── 1-Introduction.md ├── 1.1-Organization-of-the-Specification.md ├── 1.2-Example-Programs.md ├── 1.3-Notation.md ├── 1.4-Relationship-to-Predefined-Classes-and-Interfaces.md ├── 1.5-Feedback.md └── 1.6-References.md ├── 02-Grammars ├── 1.6-References.md ├── 2.1-Context-Free-Grammars.md ├── 2.2-The-Lexical-Grammar.md ├── 2.3-The-Syntactic-Grammar.md └── 2.4-Grammar-Notation.md ├── 03-Lexical-Structure ├── 3-Lexical-Structure.md ├── 3.1-Unicode.md ├── 3.10-Literals.md ├── 3.10.1-Integer-Literals.md ├── 3.10.2-Floating-Point-Literals.md ├── 3.10.3-Boolean-Literals.md ├── 3.10.4-Character-Literals.md ├── 3.10.5-String-Literals.md ├── 3.10.6-Escape-Sequences-for-Character-and-String-Literals.md ├── 3.10.7-The-Null-Literal.md ├── 3.11-Separators.md ├── 3.12-Operators.md ├── 3.2-Lexical-Translations.md ├── 3.3-Unicode-Escapes.md ├── 3.4-Line-Terminators.md ├── 3.5-Input-Elements-and-Tokens.md ├── 3.6-White-Space.md ├── 3.7-Comments.md ├── 3.8-Identifiers.md └── 3.9-Keywords.md ├── 04-Types-Values-and-Variables ├── 4-Types-Values-and-Variables.md ├── 4.1-The-Kinds-of-Types-and-Values.md ├── 4.10-Subtyping.md ├── 4.10.1-Subtyping-among-Primitive-Types.md ├── 4.10.2-Subtyping-among-Class-and-Interface-Types.md ├── 4.10.3-Subtyping-among-Array-Types.md ├── 4.10.4-Least-Upper-Bound.md ├── 4.10.5-Type-Projections.md ├── 4.11-Where-Types-Are-Used.md ├── 4.12-Variables.md ├── 4.12.1-Variables-of-Primitive-Type.md ├── 4.12.2-Variables-of-Reference-Type.md ├── 4.12.3-Kinds-of-Variables.md ├── 4.12.4-final-Variables.md ├── 4.12.5-Initial-Values-of-Variables.md ├── 4.12.6-Types-Classes-and-Interfaces.md ├── 4.2 Primitive Types and Values.md ├── 4.2.1-Integral-Types-and-Values.md ├── 4.2.3-Floating-Point-Types-Formats-and-Values.md ├── 4.2.4-Floating-Point-Operations.md ├── 4.2.5-The-boolean-Type-and-boolean-Values.md ├── 4.3-Reference-Types-and-Values.md ├── 4.3.1-Objects.md ├── 4.3.2-The-Class-Object.md ├── 4.3.3-The-Class-String.md ├── 4.3.4-When-Reference-Types-Are-the-Sam.md ├── 4.4-Type-Variables.md ├── 4.5-Parameterized-Types.md ├── 4.5.1-Type-Arguments-of-Parameterized-Types.md ├── 4.5.2-Members-and-Constructors-of-Parameterized-Types.md ├── 4.6-Type-Erasure.md ├── 4.7-Reifiable-Types.md ├── 4.8-Raw-Types.md └── 4.9-Intersection-Types.md ├── 05-Conversions-and-Contexts ├── 5-Conversions-and-Contexts.md ├── 5.1-Kinds-of-Conversion.md ├── 5.2-Assignment-Contexts.md ├── 5.3-Invocation-Contexts.md ├── 5.4-String-Contexts.md ├── 5.5-Casting-Contexts.md └── 5.6-Numeric-Contexts.md ├── 06-Names ├── 6-Names.md ├── 6.1-Declarations.md ├── 6.2-Names-and-Identifiers.md ├── 6.3-Scope-of-a-Declaration.md ├── 6.4-Shadowing-and-Obscuring.md ├── 6.5-Determining-the-Meaning-of-a-Name.md ├── 6.6-Access-Control.md └── 6.7-Fully-Qualified-Names-and-Canonical-Names.md ├── 07-Packages-and-Modules ├── 7-Packages-and-Modules.md ├── 7.1-Package-Members.md ├── 7.2-Host-Support-for-Modules-and-Packages.md ├── 7.3-Compilation-Units.md ├── 7.4-Package-Declarations.md └── 7.7-Module-Declarations.md ├── 08-Classes ├── 8-Classes.md ├── 8.1-Class-Declarations.md ├── 8.2-Class-Members.md ├── 8.3-Field-Declarations.md ├── 8.4-Method-Declarations.md ├── 8.5-Member-Type-Declarations.md ├── 8.6-Instance-Initializers.md ├── 8.7-Static-Initializers.md ├── 8.8-Constructor-Declarations.md └── 8.9-Enum-Types.md ├── 09-Interfaces ├── 9-Interfaces.md ├── 9.1-Interface-Declarations.md ├── 9.2-Interface-Members.md ├── 9.3-Field-Constant-Declarations.md ├── 9.4-Method-Declarations.md ├── 9.5-Member-Type-Declarations.md ├── 9.6-Annotation-Type.md ├── 9.7 Annotations.md ├── 9.8-Functional-Interfaces.md └── 9.9-Function-Types.md ├── 10-Arrays ├── 10-Arrays.md ├── 10.1-Array-Types.md ├── 10.2-Array-Variables.md ├── 10.3-Array-Creation.md ├── 10.4-Array-Access.md ├── 10.5-Array-Store-Exception.md ├── 10.6-Array-Initializers.md ├── 10.7-Array-Members.md ├── 10.8-Class-Objects-for-Arrays.md └── 10.9-An-Array-of-Characters-Is-Not-a-String.md ├── 11-Exceptions ├── 11-Exceptions.md ├── 11.1-The-Kinds-and-Causes-of-Exceptions.md ├── 11.2-Compile-Time-Checking-of-Exceptions.md └── 11.3-Run-Time-Handling-of-an-Exception.md ├── 12-Execution ├── 12-Execution.md ├── 12.1-Java-Virtual-Machine-Startup.md ├── 12.2-Loading-of-Classes-and-Interfaces.md ├── 12.3-Linking-of-Classes-and-Interfaces.md ├── 12.4-Initialization-of-Classes-and-Interfaces.md ├── 12.5-Creation-of-New-Class-Instances.md ├── 12.6-Finalization-of-Class-Instances.md ├── 12.7-Unloading-of-Classes-and-Interfaces.md └── 12.8-Program-Exit.md ├── 13-Binary-Compatibility ├── 13-Binary-Compatibility.md ├── 13.1-The-Form-of-a-Binary.md ├── 13.2 What Binary Compatibility Is and Is Not.md ├── 13.3 Evolution of Packages and Modules.md ├── 13.4-Evolution-of-Classes.md └── 13.5-Evolution-of-Interface.md ├── 14-Blocks-and-Statements ├── 14-Blocks-and-Statements.md ├── 14-Blocks.md ├── 14.1-Normal-and-Abrupt-Completion-of-Statements.md ├── 14.10-The-assert-Statement.md ├── 14.11-The-switch-Statement.md ├── 14.12-The-while-Statements.md ├── 14.13-The-do-Statement.md ├── 14.14-The-for-statement.md ├── 14.15-The-break-Statement.md ├── 14.16-The-continue-Statement.md ├── 14.17-The-return-Statement.md ├── 14.18-The-throw-Statement.md ├── 14.19-The-synchronized-Statement.md ├── 14.20-The-try-statement.md ├── 14.21-Unreachable-Statements.md ├── 14.3-Local-Class-Declarations.md ├── 14.4-Local-Variable-Declaration-Statements.md ├── 14.5-Statements.md ├── 14.6-The-Empty-Statement.md ├── 14.7-Labeled-Statements.md ├── 14.8-Expression-Statements.md └── 14.9-The-if-Statement.md ├── 15-Expressions ├── 15-Expressions.md ├── 15.1-Evaluation-Denotation-and-Result.md ├── 15.10-Array-Creation-and-Access-Expressions.md ├── 15.11-Field-Access-Expressions.md ├── 15.12-Method-Invocation-Expressions.md ├── 15.13-Method-Reference-Expressions.md ├── 15.14-Postfix-Expressions.md ├── 15.15-Unary-Operators.md ├── 15.16-Cast-Expressions.md ├── 15.17-Multiplicative-Operators.md ├── 15.18-Additive-Operators.md ├── 15.19-Shift-Operators].md ├── 15.2-Forms-of-Expressions.md ├── 15.20-Relational-Operators.md ├── 15.21-Equality-Operators.md ├── 15.23-Conditional-And-Operator.md ├── 15.24-Conditional-Or-Operator.md ├── 15.25-Conditional-Operator.md ├── 15.26-Assignment-Operators.md ├── 15.27-Lambda-Expressions.md ├── 15.28-Constant-Expressions.md ├── 15.3-Type-of-an-Expression.md ├── 15.4-FP-strict-Expression.md ├── 15.5-Expressions-and-Run-Time-Checks.md ├── 15.6-Normal-and-Abrupt-Completion-of-Evaluation.md ├── 15.7-Evaluation-Order.md ├── 15.8-Primary-Expressions.md └── 15.9-Class-Instance-Creation-Expressions.md ├── 16-Definite-Assignment ├── 16-Definite-Assignment.md ├── 16.1-Definite-Assignment-and-Expressions.md ├── 16.2-Definite-Assignment-and-Statements.md ├── 16.3-Definite-Assignment-and-Parameters.md ├── 16.4-Definite-Assignment-and-Array-Initializers.md ├── 16.5-Definite-Assignment-and-Enum-Constants.md ├── 16.6-Definite-Assignment-and-Anonymous-Classes.md ├── 16.7-Definite-Assignment-and-Member-Types.md ├── 16.8-Definite-Assignment-and-Static-Initializers.md └── 16.9-Definite-Assignment-Constructors-and-Instance-Initializers.md ├── 17-Threads-and-Locks ├── 17-Threads-and-Locks.md ├── 17.1-Synchronization.md ├── 17.2-Wait-Sets-and-Notification.md ├── 17.3-Sleep-and-Yield.md ├── 17.4-Memory-Model.md ├── 17.5-final-Field-Semantics.md ├── 17.6-Word-Tearing.md └── 17.7-Non-Atomic-Treatment-of-double-and-long.md └── 18-Type-Inference ├── 18-Type-Inference.md ├── 18.1-Concepts-and-Notation.md ├── 18.2-Reduction.md ├── 18.3-Incorporation.md ├── 18.4-Resolution.md └── 18.5-Uses-of-Inference.md /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Way Lau (http://www.waylau.com/) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Java® Virtual Machine Specification.《Java 虚拟机规范(第11版)》中文翻译及示例 2 | 3 | Chinese translation of [The Java® Virtual Machine Specification](https://docs.oracle.com/javase/specs/jls/se11/html/index.html).《Java 虚拟机规范(第11版)》中文翻译及示例。 4 | 5 | 本规范的最新版本为 Java SE 11。 6 | 7 | 本书业余时间所著,水平有限、时间紧张,难免疏漏,欢迎指正,[点此](https://github.com/waylau/java-virtual-machine-specification/issues)提问。感谢您的参与! 8 | 9 | 书中所有实例,在 的 `samples` 目录下。 10 | 从[目录](SUMMARY.md)开始阅读吧!另外有 GitBook 的版本方便阅读 。 11 | 12 | ### Contact 联系作者: 13 | 14 | * Blog: [waylau.com](https://waylau.com) 15 | * Gmail: [waylau521(at)gmail.com](mailto:waylau521@gmail.com) 16 | * Weibo: [waylau521](http://weibo.com/waylau521) 17 | * Twitter: [waylau521](https://twitter.com/waylau521) 18 | * Github : [waylau](https://github.com/waylau) 19 | 20 | ### Support Me 请老卫喝一杯 21 | 22 | ![开源捐赠](https://waylau.com/images/showmethemoney-sm.jpg) 23 | 24 | 25 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | 4 | * [1 引言](docs/01-Introduction/1-Introduction.md) 5 | * [1.1 章节组织](docs/01-Introduction/1.1-Organization-of-the-Specification.md) 6 | * [1.2 程序示例](docs/01-Introduction/1.2-Example-Programs.md) 7 | * [1.3 符号](docs/01-Introduction/1.3-Notation.md) 8 | * [1.4 与预定义类和接口的关系](docs/01-Introduction/1.4-Relationship-to-Predefined-Classes-and-Interfaces.md) 9 | * [1.5 反馈](docs/01-Introduction/1.5-Feedback.md) 10 | * [1.6 参考引用](docs/01-Introduction/1.6-References.md) 11 | * [2 Grammars](docs/02-Grammars/1.6-References.md) 12 | * [2.1 Context-Free Grammars](docs/02-Grammars/2.1-Context-Free-Grammars.md) 13 | * [2.2 The Lexical Grammar](docs/02-Grammars/2.2-The-Lexical-Grammar.md) 14 | * [2.3 The Syntactic Grammar](docs/02-Grammars/2.3-The-Syntactic-Grammar.md) 15 | * [2.4 Grammar Notation](docs/02-Grammars/2.4-Grammar-Notation.md) 16 | * [3 Lexical Structure](docs/03-Lexical-Structure/3-Lexical-Structure.md) 17 | * [3.1 Unicode](docs/03-Lexical-Structure/3.1-Unicode.md) 18 | * [3.2 Lexical Translations](docs/03-Lexical-Structure/3.2-Lexical-Translations.md) 19 | * [3.3 Unicode Escapes](docs/03-Lexical-Structure/3.3-Unicode-Escapes.md) 20 | * [3.4 Line Terminators](docs/03-Lexical-Structure/3.4-Line-Terminators.md) 21 | * [3.5 Input Elements and Tokens](docs/03-Lexical-Structure/3.5-Input-Elements-and-Tokens.md) 22 | * [3.6 White Space](docs/03-Lexical-Structure/3.6-White-Space.md) 23 | * [3.7 Comments](docs/03-Lexical-Structure/3.7-Comments.md) 24 | * [3.8 Identifiers](docs/03-Lexical-Structure/3.8-Identifiers.md) 25 | * [3.9 Keywords](docs/03-Lexical-Structure/3.9-Keywords.md) 26 | * [3.10 Literals](docs/03-Lexical-Structure/3.10-Literals.md) 27 | * [3.10.1 Integer Literals](docs/03-Lexical-Structure/3.10.1-Integer-Literals.md) 28 | * [3.10.2 Floating-Point Literals](docs/03-Lexical-Structure/3.10.2-Floating-Point-Literals.md) 29 | * [3.10.3 Boolean Literals](docs/03-Lexical-Structure/3.10.3-Boolean-Literals.md) 30 | * [3.10.4 Character Literals](docs/03-Lexical-Structure/3.10.4-Character-Literals.md) 31 | * [3.10.5 String Literals](docs/03-Lexical-Structure/3.10.5-String-Literals.md) 32 | * [3.10.6 Escape Sequences for Character and String Literals](docs/03-Lexical-Structure/3.10.6-Escape-Sequences-for-Character-and-String-Literals.md) 33 | * [3.10.7 The Null Literal](docs/03-Lexical-Structure/3.10.7-The-Null-Literal.md) 34 | * [3.11 Separators](docs/03-Lexical-Structure/3.11-Separators.md) 35 | * [3.12 Operators](docs/03-Lexical-Structure/3.12-Operators.md) 36 | * [4 Types, Values, and Variables](docs/04-Types-Values-and-Variables/4-Types-Values-and-Variables.md) 37 | * [4.1 The Kinds of Types and Values](docs/04-Types-Values-and-Variables/4.1-The-Kinds-of-Types-and-Values.md) 38 | * [4.2 Primitive Types and Values](docs/04-Types-Values-and-Variables/4.2 Primitive Types and Values.md) 39 | * [4.2.1 Integral Types and Values](docs/04-Types-Values-and-Variables/4-Types-Values-and-Variables.md) 40 | * [4.2.2 Integer Operations](docs/04-Types-Values-and-Variables/4.2.1-Integral-Types-and-Values.md) 41 | * [4.2.3 Floating-Point Types, Formats, and Values](docs/04-Types-Values-and-Variables/4.2.3-Floating-Point-Types-Formats-and-Values.md) 42 | * [4.2.4 Floating-Point Operations](docs/04-Types-Values-and-Variables/4.2.4-Floating-Point-Operations.md) 43 | * [4.2.5 The boolean Type and boolean Values](docs/04-Types-Values-and-Variables/4.2.5-The-boolean-Type-and-boolean-Values.md) 44 | * [4.3 Reference Types and Values](docs/04-Types-Values-and-Variables/4.3-Reference-Types-and-Values.md) 45 | * [4.3.1 Objects](docs/04-Types-Values-and-Variables/4.3.1-Objects.md) 46 | * [4.3.2 The Class Object](docs/04-Types-Values-and-Variables/4.3.2-The-Class-Object.md) 47 | * [4.3.3 The Class String](docs/04-Types-Values-and-Variables/4.3.3-The-Class-String.md) 48 | * [4.3.4 When Reference Types Are the Same](docs/04-Types-Values-and-Variables/4.3.4-When-Reference-Types-Are-the-Sam.md) 49 | * [4.4 Type Variables](docs/04-Types-Values-and-Variables/4.4-Type-Variables.md) 50 | * [4.5 Parameterized Types](docs/04-Types-Values-and-Variables/4.5-Parameterized-Types.md) 51 | * [4.5.1 Type Arguments of Parameterized Types](docs/04-Types-Values-and-Variables/4.5.1-Type-Arguments-of-Parameterized-Types.md) 52 | * [4.5.2 Members and Constructors of Parameterized Types](docs/04-Types-Values-and-Variables/4.5.2-Members-and-Constructors-of-Parameterized-Types.md) 53 | * [4.6 Type Erasure](docs/04-Types-Values-and-Variables/4.6-Type-Erasure.md) 54 | * [4.7 Reifiable Types](docs/04-Types-Values-and-Variables/4.7-Reifiable-Types.md) 55 | * [4.8 Raw Types](docs/04-Types-Values-and-Variables/4.8-Raw-Types.md) 56 | * [4.9 Intersection Types](docs/04-Types-Values-and-Variables/4.9-Intersection-Types.md) 57 | * [4.10 Subtyping](docs/04-Types-Values-and-Variables/4.10-Subtyping.md) 58 | * [4.10.1 Subtyping among Primitive Types](docs/04-Types-Values-and-Variables/4.10.1-Subtyping-among-Primitive-Types.md) 59 | * [4.10.2 Subtyping among Class and Interface Types](docs/04-Types-Values-and-Variables/4.10.2-Subtyping-among-Class-and-Interface-Types.md) 60 | * [4.10.3 Subtyping among Array Types](docs/04-Types-Values-and-Variables/4.10.3-Subtyping-among-Array-Types.md) 61 | * [4.10.4 Least Upper Bound](docs/04-Types-Values-and-Variables/4.10.4-Least-Upper-Bound.md) 62 | * [4.10.5 Type Projections](docs/04-Types-Values-and-Variables/4.10.5-Type-Projections.md) 63 | * [4.11 Where Types Are Used](docs/04-Types-Values-and-Variables/4.11-Where-Types-Are-Used.md) 64 | * [4.12 Variables](docs/04-Types-Values-and-Variables/4.12-Variables.md) 65 | * [4.12.1 Variables of Primitive Type](docs/04-Types-Values-and-Variables/4.12.1-Variables-of-Primitive-Type.md) 66 | * [4.12.2 Variables of Reference Type](docs/04-Types-Values-and-Variables/4.12.2-Variables-of-Reference-Type.md) 67 | * [4.12.3 Kinds of Variables](docs/04-Types-Values-and-Variables/4.12.3-Kinds-of-Variables.md) 68 | * [4.12.4 final Variables](docs/04-Types-Values-and-Variables/4.12.4-final-Variables.md) 69 | * [4.12.5 Initial Values of Variables](docs/04-Types-Values-and-Variables/4.12.5-Initial-Values-of-Variables.md) 70 | * [4.12.6 Types, Classes, and Interfaces](docs/04-Types-Values-and-Variables/4.12.6-Types-Classes-and-Interfaces.md) 71 | * [5 Conversions and Contexts](docs/05-Conversions-and-Contexts/5-Conversions-and-Contexts.md) 72 | * [5.1 Kinds of Conversion](docs/05-Conversions-and-Contexts/5.1-Kinds-of-Conversion.md) 73 | * [5.1.1 Identity Conversion 98 74 | * [5.1.2 Widening Primitive Conversion 98 75 | * [5.1.3 Narrowing Primitive Conversion 100 76 | * [5.1.4 Widening and Narrowing Primitive Conversion 103 77 | * [5.1.5 Widening Reference Conversion 103 78 | * [5.1.6 Narrowing Reference Conversion 103 79 | * [5.1.6.1 Allowed Narrowing Reference Conversion 104 80 | * [5.1.6.2 Checked and Unchecked Narrowing Reference 81 | * [5.1.6.3 Narrowing Reference Conversions at Run Time 105 82 | * [5.1.7 Boxing Conversion 107 83 | * [5.1.8 Unboxing Conversion 109 84 | * [5.1.9 Unchecked Conversion 110 85 | * [5.1.10 Capture Conversion 111 86 | * [5.1.11 String Conversion 113 87 | * [5.1.12 Forbidden Conversions 114 88 | * [5.1.13 Value Set Conversion 114 89 | * [5.2 Assignment Contexts](docs/05-Conversions-and-Contexts/5.2-Assignment-Contexts.md) 90 | * [5.3 Invocation Contexts](docs/05-Conversions-and-Contexts/5.3-Invocation-Contexts.md) 91 | * [5.4 String Contexts](docs/05-Conversions-and-Contexts/5.4-String-Contexts.md) 92 | * [5.5 Casting Contexts](docs/05-Conversions-and-Contexts/5.5-Casting-Contexts.md) 93 | * [5.6 Numeric Contexts](docs/05-Conversions-and-Contexts/5.6-Numeric-Contexts.md) 94 | * [5.6.1 Unary Numeric Promotion 129 95 | * [5.6.2 Binary Numeric Promotion 130 96 | * [6 Names](docs/06-Names/6-Names.md) 97 | * [6.1 Declarations](docs/06-Names/6.1-Declarations.md) 98 | * [6.2 Names and Identifiers](docs/06-Names/6.2-Names-and-Identifiers.md) 99 | * [6.3 Scope of a Declaration](docs/06-Names/6.3-Scope-of-a-Declaration.md) 100 | * [6.4 Shadowing and Obscuring](docs/06-Names/6.4-Shadowing-and-Obscuring.md) 101 | * [6.4.1 Shadowing 149 102 | * [6.4.2 Obscuring 152 103 | * [6.5 Determining the Meaning of a Name](docs/06-Names/6.5-Determining-the-Meaning-of-a-Name.md) 104 | * [6.5.1 Syntactic Classification of a Name According to Context 154 105 | * [6.5.2 Reclassification of Contextually Ambiguous Names 157 106 | * [6.5.3 Meaning of Module Names and Package Names 160 107 | * [6.5.6 Meaning of Expression Names 162 108 | * [6.6 Access Control](docs/06-Names/6.6-Access-Control.md) 109 | * [6.6.1 Determining Accessibility 168 110 | * [6.6.2 Details on protected Access 172 111 | * [6.7 Fully Qualified Names and Canonical Names](docs/06-Names/6.7-Fully-Qualified-Names-and-Canonical-Names.md) 112 | * [7 Packages and Modules](docs/07-Packages-and-Modules/7-Packages-and-Modules.md) 113 | * [7.1 Package Members](docs/07-Packages-and-Modules/7.1-Package-Members.md) 114 | * [7.2 Host Support for Modules and Packages](docs/07-Packages-and-Modules/7.2-Host-Support-for-Modules-and-Packages.md) 115 | * [7.3 Compilation Units](docs/07-Packages-and-Modules/7.3-Compilation-Units.md) 116 | * [7.4 Package Declarations](docs/07-Packages-and-Modules/7.4-Package-Declarations.md) 117 | * [7.4.1 Named Packages 184 118 | * [7.4.2 Unnamed Packages 184 119 | * [7.4.3 Package Observability and Visibility 185 120 | * [7.5 Import Declarations 186 121 | * [7.5.1 Single-Type-Import Declarations 187 122 | * [7.5.2 Type-Import-on-Demand Declarations 189 123 | * [7.5.3 Single-Static-Import Declarations 190 124 | * [7.5.4 Static-Import-on-Demand Declarations 191 125 | * [7.6 Top Level Type Declarations 192 126 | * [7.7 Module Declarations](docs/07-Packages-and-Modules/7.7-Module-Declarations.md) 127 | * [7.7.1 Dependences 197 128 | * [7.7.2 Exported and Opened Packages 200 129 | * [7.7.3 Service Consumption 201 130 | * [7.7.4 Service Provision 201 131 | * [7.7.5 Unnamed Modules 202 132 | * [7.7.6 Observability of a Module 203 133 | * [8 Classes](docs/08-Classes/8-Classes.md) 134 | * [8.1 Class Declarations](docs/08-Classes/8.1-Class-Declarations.md) 135 | * [8.1.1 Class Modifiers 207 136 | * [8.1.2 Generic Classes and Type Parameters 210 137 | * [8.1.3 Inner Classes and Enclosing Instances 213 138 | * [8.1.4 Superclasses and Subclasses 216 139 | * [8.1.5 Superinterfaces 218 140 | * [8.1.6 Class Body and Member Declarations 222 141 | * [8.2 Class Members](docs/08-Classes/8.2-Class-Members.md) 142 | * [8.3 Field Declarations](docs/08-Classes/8.3-Field-Declarations.md) 143 | * [8.3.1 Field Modifiers 232 144 | * [8.3.2 Field Initialization 237 145 | * [8.3.3 Restrictions on Field References in Initializers 239 146 | * [8.4 Method Declarations](docs/08-Classes/8.4-Method-Declarations.md) 147 | * [8.4.1 Formal Parameters 243 148 | * [8.4.2 Method Signature 247 149 | * [8.4.3 Method Modifiers 248 150 | * [8.4.4 Generic Methods 253 151 | * [8.4.5 Method Result 254 152 | * [8.4.6 Method Throws 255 153 | * [8.4.7 Method Body 256 154 | * [8.4.8 Inheritance, Overriding, and Hiding 257 155 | * [8.4.9 Overloading 268 156 | * [8.5 Member Type Declarations](docs/08-Classes/8.5-Member-Type-Declarations.md) 157 | * [8.5.1 Static Member Type Declarations 158 | * [8.6 Instance Initializers](docs/08-Classes/8.6-Instance-Initializers.md) 159 | * [8.7 Static Initializers](docs/08-Classes/8.7-Static-Initializers.md) 160 | * [8.8 Constructor Declarations](docs/08-Classes/8.8-Constructor-Declarations.md) 161 | * [8.8.1 Formal Parameters 274 162 | * [8.8.2 Constructor Signature 275 163 | * [8.8.3 Constructor Modifiers 275 164 | * [8.8.4 Generic Constructors 276 165 | * [8.8.5 Constructor Throws 276 166 | * [8.8.6 The Type of a Constructor 277 167 | * [8.8.7 Constructor Body 277 168 | * [8.8.7.1 Explicit Constructor Invocations 278 169 | * [8.8.8 Constructor Overloading 282 170 | * [8.8.9 Default Constructor 282 171 | * [8.8.10 Preventing Instantiation of a Class 284 172 | * [8.9 Enum Types](docs/08-Classes/8.9-Enum-Types.md) 173 | * [8.9.1 Enum Constants 285 174 | * [8.9.2 Enum Body Declarations 286 175 | * [8.9.3 Enum Members 288 176 | * [9 Interfaces](docs/09-Interfaces/9-Interfaces.md) 177 | * [9.1 Interface Declarations](docs/09-Interfaces/9.1-Interface-Declarations.md) 178 | * [9.1.1 Interface Modifiers 296 179 | * [9.1.2 Generic Interfaces and Type Parameters 297 180 | * [9.1.3 Superinterfaces and Subinterfaces 298 181 | * [9.1.4 Interface Body and Member Declarations 300 182 | * [9.2 Interface Members](docs/09-Interfaces/9.2-Interface-Members.md) 183 | * [9.3 Field (Constant) Declarations](docs/09-Interfaces/9.3-Field-Constant-Declarations.md) 184 | * [9.3.1 Initialization of Fields in Interfaces 303 185 | * [9.4 Method Declarations](docs/09-Interfaces/9.4-Method-Declarations.md) 186 | * [9.4.1 Inheritance and Overriding 305 187 | * [9.4.2 Overloading 309 188 | * [9.4.3 Interface Method Body 309 189 | * [9.5 Member Type Declarations](docs/09-Interfaces/9.5-Member-Type-Declarations.md) 190 | * [9.6 Annotation Types](docs/09-Interfaces/9.6-Annotation-Type.md) 191 | * [9.6.1 Annotation Type Elements 312 192 | * [9.6.2 Defaults for Annotation Type Elements 315 193 | * [9.6.3 Repeatable Annotation Types 316 194 | * [9.6.4 Predefined Annotation Types 320 195 | * [9.7 Annotations](docs/09-Interfaces/9.7 Annotations.md) 196 | * [9.7.1 Normal Annotations 329 197 | * [9.7.2 Marker Annotations 331 198 | * [9.7.3 Single-Element Annotations 332 199 | * [9.7.4 Where Annotations May Appear 333 200 | * [9.7.5 Multiple Annotations of the Same Type 338 201 | * [9.8 Functional Interfaces](docs/09-Interfaces/9.8-Functional-Interfaces.md) 202 | * [9.9 Function Types](docs/09-Interfaces/9.9-Function-Types.md) 203 | * [10 Arrays](docs/10-Arrays/10-Arrays.md) 204 | * [10.1 Array Types](docs/10-Arrays/10.1-Array-Types.md) 205 | * [10.2 Array Variables](docs/10-Arrays/10.2-Array-Variables.md) 206 | * [10.3 Array Creation](docs/10-Arrays/10.3-Array-Creation.md) 207 | * [10.4 Array Access](docs/10-Arrays/10.4-Array-Access.md) 208 | * [10.5 Array Store Exception](docs/10-Arrays/10.5-Array-Store-Exception.md) 209 | * [10.6 Array Initializers](docs/10-Arrays/10.6-Array-Initializers.md) 210 | * [10.7 Array Members](docs/10-Arrays/10.7-Array-Members.md) 211 | * [10.8 Class Objects for Arrays](docs/10-Arrays/10.8-Class-Objects-for-Arrays.md) 212 | * [10.9 An Array of Characters Is Not a String](docs/10-Arrays/10.9-An-Array-of-Characters-Is-Not-a-String.md) 213 | * [11 Exceptions](docs/11-Exceptions/11-Exceptions.md) 214 | * [11.1 The Kinds and Causes of Exceptions](docs/11-Exceptions/11.1-The-Kinds-and-Causes-of-Exceptions.md) 215 | * [11.1.1 The Kinds of Exceptions 362 216 | * [11.1.2 The Causes of Exceptions 363 217 | * [11.1.3 Asynchronous Exceptions 364 218 | * [11.2 Compile-Time Checking of Exceptions](docs/11-Exceptions/11.2-Compile-Time-Checking-of-Exceptions.md) 219 | * [11.2.1 Exception Analysis of Expressions 366 220 | * [11.2.2 Exception Analysis of Statements 367 221 | * [11.2.3 Exception Checking 368 222 | * [11.3 Run-Time Handling of an Exception](docs/11-Exceptions/11.3-Run-Time-Handling-of-an-Exception.md) 223 | * [12 Execution](docs/12-Execution/12-Execution.md) 224 | * [12.1 Java Virtual Machine Startup](docs/12-Execution/12.1-Java-Virtual-Machine-Startup.md) 225 | * [12.1.1 Load the Class Test 376 226 | * [12.1.2 Link Test: Verify, Prepare, (Optionally) Resolve 376 227 | * [12.1.3 Initialize Test: Execute Initializers 377 228 | * [12.1.4 Invoke Test.main 378 229 | * [12.2 加载类和接口](docs/12-Execution/12.2-Loading-of-Classes-and-Interfaces.md) 230 | * 12.2.1 加载过程 231 | * [12.3 Linking of Classes and Interfaces](docs/12-Execution/12.3-Linking-of-Classes-and-Interfaces.md) 232 | * [12.3.1 Verification of the Binary Representation 380 233 | * [12.3.2 Preparation of a Class or Interface Type 381 234 | * [12.3.3 Resolution of Symbolic References 381 235 | * [12.4 Initialization of Classes and Interfaces](docs/12-Execution/12.4-Initialization-of-Classes-and-Interfaces.md) 236 | * [12.4.1 When Initialization Occurs 383 237 | * [12.4.2 Detailed Initialization Procedure 386 238 | * [12.5 Creation of New Class Instances](docs/12-Execution/12.5-Creation-of-New-Class-Instances.md) 239 | * [12.6 Finalization of Class Instances](docs/12-Execution/12.6-Finalization-of-Class-Instances.md) 240 | * [12.6.1 Implementing Finalization 393 241 | * [12.6.2 Interaction with the Memory Model 394 242 | * [12.7 Unloading of Classes and Interfaces](docs/12-Execution/12.7-Unloading-of-Classes-and-Interfaces.md) 243 | * [12.8 Program Exit](docs/12-Execution/12.8-Program-Exit.md) 244 | * [13 Binary Compatibility](docs/13-Binary-Compatibility/13-Binary-Compatibility.md) 245 | * [13.1 The Form of a Binary](docs/13-Binary-Compatibility/13.1-The-Form-of-a-Binary.md) 246 | * [13.2 What Binary Compatibility Is and Is Not](docs/13-Binary-Compatibility/13.2 What Binary Compatibility Is and Is Not.md) 247 | * [13.3 Evolution of Packages and Modules](docs/13-Binary-Compatibility/13.3 Evolution of Packages and Modules.md) 248 | * [13.4 Evolution of Classes](docs/13-Binary-Compatibility/13.4-Evolution-of-Classes.md) 249 | * [13.4.1 abstract Classes 408 250 | * [13.4.2 final Classes 409 251 | * [13.4.3 public Classes 409 252 | * [13.4.4 Superclasses and Superinterfaces 409 253 | * [13.4.5 Class Type Parameters 411 254 | * [13.4.6 Class Body and Member Declarations 411 255 | * [13.4.7 Access to Members and Constructors 413 256 | * [13.4.8 Field Declarations 414 257 | * [13.4.9 final Fields and static Constant Variables 258 | * [13.4.10 static Fields 417 259 | * [13.4.11 transient Fields 417 260 | * [13.4.12 Method and Constructor Declarations 417 261 | * [13.4.13 Method and Constructor Type Parameters 418 262 | * [13.4.14 Method and Constructor Formal Parameters 419 263 | * [13.4.15 Method Result Type 420 264 | * [13.4.16 abstract Methods 420 265 | * [13.4.17 final Methods 421 266 | * [13.4.18 native Methods 421 267 | * [13.4.19 static Methods 422 268 | * [13.4.20 synchronized Methods 422 269 | * [13.4.21 Method and Constructor Throws 422 270 | * [13.4.22 Method and Constructor Body 422 271 | * [13.4.23 Method and Constructor Overloading 422 272 | * [13.4.24 Method Overriding 424 273 | * [13.4.25 Static Initializers 424 274 | * [13.4.26 Evolution of Enums 424 275 | * [13.5 Evolution of Interfaces](docs/13-Binary-Compatibility/13.5-Evolution-of-Interface.md) 276 | * [13.5.1 public Interfaces 424 277 | * [13.5.2 Superinterfaces 425 278 | * [13.5.3 Interface Members 425 279 | * [13.5.4 Interface Type Parameters 425 280 | * [13.5.5 Field Declarations 426 281 | * [13.5.6 Interface Method Declarations 426 282 | * [13.5.7 Evolution of Annotation Types 427 283 | * [14 Blocks and Statements](docs/14-Blocks-and-Statements/14-Blocks-and-Statements.md) 284 | * [14.1 Normal and Abrupt Completion of Statements](docs/14-Blocks-and-Statements/14.1-Normal-and-Abrupt-Completion-of-Statements.md) 285 | * [14.2 Blocks](docs/14-Blocks-and-Statements/14-Blocks.md) 286 | * [14.3 Local Class Declarations](docs/14-Blocks-and-Statements/14.3-Local-Class-Declarations.md) 287 | * [14.4 Local Variable Declaration Statements](docs/14-Blocks-and-Statements/14.4-Local-Variable-Declaration-Statements.md) 288 | * [14.4.1 Local Variable Declarators and Types 434 289 | * [14.4.2 Execution of Local Variable Declarations 435 290 | * [14.5 Statements](docs/14-Blocks-and-Statements/14.5-Statements.md) 291 | * [14.6 The Empty Statement](docs/14-Blocks-and-Statements/14.6-The-Empty-Statement.md) 292 | * [14.7 Labeled Statements](docs/14-Blocks-and-Statements/14.7-Labeled-Statements.md) 293 | * [14.8 Expression Statements](docs/14-Blocks-and-Statements/14.8-Expression-Statements.md) 294 | * [14.9 The if Statement](docs/14-Blocks-and-Statements/14.9-The-if-Statement.md) 295 | * [14.9.1 The if-then Statement 441 296 | * [14.9.2 The if-then-else Statement 441 297 | * [14.10 The assert Statement](docs/14-Blocks-and-Statements/14.10-The-assert-Statement.md) 298 | * [14.11 The switch Statement](docs/14-Blocks-and-Statements/14.11-The-switch-Statement.md) 299 | * [14.12 The while Statement](docs/14-Blocks-and-Statements/14.12-The-while-Statements.md) 300 | * [14.12.1 Abrupt Completion of while Statement 449 301 | * [14.13 The do Statement](docs/14-Blocks-and-Statements/14.13-The-do-Statement.md) 302 | * [14.13.1 Abrupt Completion of do Statement 451 303 | * [14.14 The for Statement](docs/14-Blocks-and-Statements/14.14-The-for-statement.md) 304 | * [14.14.1 The basic for Statement 452 305 | * [14.14.2 The enhanced for statement 455 306 | * [14.15 The break Statement](docs/14-Blocks-and-Statements/14.15-The-break-Statement.md) 307 | * [14.16 The continue Statement](docs/14-Blocks-and-Statements/14.16-The-continue-Statement.md) 308 | * [14.17 The return Statement](docs/14-Blocks-and-Statements/14.17-The-return-Statement.md) 309 | * [14.18 The throw Statement](docs/14-Blocks-and-Statements/14.18-The-throw-Statement.md) 310 | * [14.19 The synchronized Statement](docs/14-Blocks-and-Statements/14.19-The-synchronized-Statement.md) 311 | * [14.20 The try statement](docs/14-Blocks-and-Statements/14.20-The-try-statement.md) 312 | * [14.20.1 Execution of try-catch 470 313 | * [14.20.2 Execution of try-finally and try-catch-finally 471 314 | * [14.20.3 try-with-resources 473 315 | * [14.21 Unreachable Statements](docs/14-Blocks-and-Statements/14.21-Unreachable-Statements.md) 316 | * [15 Expressions](docs/15-Expressions/15-Expressions.md) 317 | * [15.1 Evaluation, Denotation, and Result](docs/15-Expressions/15.1-Evaluation-Denotation-and-Result.md) 318 | * [15.2 Forms of Expressions](docs/15-Expressions/15.2-Forms-of-Expressions.md) 319 | * [15.3 Type of an Expression](docs/15-Expressions/15.3-Type-of-an-Expression.md) 320 | * [15.4 FP-strict Expressions](docs/15-Expressions/15.4-FP-strict-Expression.md) 321 | * [15.5 Expressions and Run-Time Checks](docs/15-Expressions/15.5-Expressions-and-Run-Time-Checks.md) 322 | * [15.6 Normal and Abrupt Completion of Evaluation](docs/15-Expressions/15.6-Normal-and-Abrupt-Completion-of-Evaluation.md) 323 | * [15.7 Evaluation Order](docs/15-Expressions/15.7-Evaluation-Order.md) 324 | * [15.7.1 Evaluate Left-Hand Operand First 494 325 | * [15.7.2 Evaluate Operands before Operation 496 326 | * [15.7.3 Evaluation Respects Parentheses and Precedence 497 327 | * [15.7.4 Argument Lists are Evaluated Left-to-Right 498 328 | * [15.7.5 Evaluation Order for Other Expressions 499 329 | * [15.8 Primary Expressions](docs/15-Expressions/15.8-Primary-Expressions.md) 330 | * [15.8.1 Lexical Literals 500 331 | * [15.8.2 Class Literals 501 332 | * [15.8.3 this 502 333 | * [15.8.4 Qualified this 503 334 | * [15.8.5 Parenthesized Expressions 503 335 | * [15.9 Class Instance Creation Expressions](docs/15-Expressions/15.9-Class-Instance-Creation-Expressions.md) 336 | * [15.9.1 Determining the Class being Instantiated 506 337 | * [15.9.2 Determining Enclosing Instances 507 338 | * [15.9.3 Choosing the Constructor and its Arguments 509 339 | * [15.9.4 Run-Time Evaluation of Class Instance Creation 340 | * [15.9.5 Anonymous Class Declarations 514 341 | * [15.9.5.1 Anonymous Constructors 515 342 | * [15.10 Array Creation and Access Expressions](docs/15-Expressions/15.10-Array-Creation-and-Access-Expressions.md) 343 | * [15.10.1 Array Creation Expressions 516 344 | * [15.10.2 Run-Time Evaluation of Array Creation Expressions 517 345 | * [15.10.3 Array Access Expressions 521 346 | * [15.10.4 Run-Time Evaluation of Array Access Expressions 521 347 | * [15.11 Field Access Expressions](docs/15-Expressions/15.11-Field-Access-Expressions.md) 348 | * [15.11.1 Field Access Using a Primary 524 349 | * [15.11.2 Accessing Superclass Members using super 527 350 | * [15.12 Method Invocation Expressions](docs/15-Expressions/15.12-Method-Invocation-Expressions.md) 351 | * [15.12.1 Compile-Time Step 1: Determine Class or Interface to Search 530 352 | * [15.12.2 Compile-Time Step 2: Determine Method Signature 532 353 | * [15.12.3 Compile-Time Step 3: Is the Chosen Method Appropriate? 548 354 | * [15.12.4 Run-Time Evaluation of Method Invocation 551 355 | * [15.13 Method Reference Expressions](docs/15-Expressions/15.13-Method-Reference-Expressions.md) 356 | * [15.13.1 Compile-Time Declaration of a Method Reference 564 357 | * [15.13.2 Type of a Method Reference 569 358 | * [15.13.3 Run-Time Evaluation of Method References 571 359 | * [15.14 Postfix Expressions](docs/15-Expressions/15.14-Postfix-Expressions.md) 360 | * [15.14.1 Expression Names 575 361 | * [15.14.2 Postfix Increment Operator ++ 575 362 | * [15.14.3 Postfix Decrement Operator -- 575 363 | * [15.15 Unary Operators](docs/15-Expressions/15.15-Unary-Operators.md) 364 | * [15.15.1 Prefix Increment Operator ++ 578 365 | * [15.15.2 Prefix Decrement Operator -- 578 366 | * [15.15.3 Unary Plus Operator + 579 367 | * [15.15.4 Unary Minus Operator - 579 368 | * [15.15.5 Bitwise Complement Operator ~ 580 369 | * [15.15.6 Logical Complement Operator ! 580 370 | * [15.16 Cast Expressions](docs/15-Expressions/15.16-Cast-Expressions.md) 371 | * [15.17 Multiplicative Operators](docs/15-Expressions/15.17-Multiplicative-Operators.md) 372 | * [15.17.1 Multiplication Operator * 583 373 | * [15.17.2 Division Operator / 584 374 | * [15.17.3 Remainder Operator % 585 375 | * [15.18 Additive Operators](docs/15-Expressions/15.18-Additive-Operators.md) 376 | * [15.18.1 String Concatenation Operator + 588 377 | * [15.18.2 Additive Operators (+ and -) for Numeric Types 591 378 | * [15.19 Shift Operators](docs/15-Expressions/15.19-Shift-Operators].md) 379 | * [15.20 Relational Operators](docs/15-Expressions/15.20-Relational-Operators.md) 380 | * [15.20.1 Numerical Comparison Operators <, <=, >, and >= 594 381 | * [15.20.2 Type Comparison Operator instanceof 596 382 | * [15.21 Equality Operators](docs/15-Expressions/15.21-Equality-Operators.md) 383 | * [15.21.1 Numerical Equality Operators == and != 597 384 | * [15.21.2 Boolean Equality Operators == and != 598 385 | * [15.21.3 Reference Equality Operators == and != 599 386 | * [15.22 Bitwise and Logical Operators 599 387 | * [15.22.1 Integer Bitwise Operators &, ^, and | 600 388 | * [15.22.2 Boolean Logical Operators &, ^, and | 601 389 | * [15.23 Conditional-And Operator &&](docs/15-Expressions/15.23-Conditional-And-Operator.md) 390 | * [15.24 Conditional-Or Operator ||](docs/15-Expressions/15.24-Conditional-Or-Operator.md) 391 | * [15.25 Conditional Operator ? : ](docs/15-Expressions/15.25-Conditional-Operator.md) 392 | * [15.25.1 Boolean Conditional Expressions 610 393 | * [15.25.2 Numeric Conditional Expressions 610 394 | * [15.25.3 Reference Conditional Expressions 611 395 | * [15.26 Assignment Operators](docs/15-Expressions/15.26-Assignment-Operators.md) 396 | * [15.26.1 Simple Assignment Operator = 613 397 | * [15.26.2 Compound Assignment Operators 619 398 | * [15.27 Lambda Expressions](docs/15-Expressions/15.27-Lambda-Expressions.md) 399 | * [15.27.1 Lambda Parameters 627 400 | * [15.27.2 Lambda Body 631 401 | * [15.27.3 Type of a Lambda Expression 634 402 | * [15.27.4 Run-Time Evaluation of Lambda Expressions 636 403 | * [15.28 Constant Expressions](docs/15-Expressions/15.28-Constant-Expressions.md) 404 | * [16 Definite Assignment](docs/16-Definite-Assignment/16-Definite-Assignment.md) 405 | * [16.1 Definite Assignment and Expressions](docs/16-Definite-Assignment/16.1-Definite-Assignment-and-Expressions.md) 406 | * [16.1.1 Boolean Constant Expressions 645 407 | * [16.1.2 Conditional-And Operator && 645 408 | * [16.1.3 Conditional-Or Operator || 646 409 | * [16.1.4 Logical Complement Operator ! 646 410 | * [16.1.5 Conditional Operator ? : 646 411 | * [16.1.6 Conditional Operator ? : 647 412 | * [16.1.7 Other Expressions of Type boolean 647 413 | * [16.1.8 Assignment Expressions 647 414 | * [16.1.9 Operators ++ and -- 648 415 | * [16.1.10 Other Expressions 648 416 | * [16.2 Definite Assignment and Statements](docs/16-Definite-Assignment/16.2-Definite-Assignment-and-Statements.md) 417 | * [16.2.1 Empty Statements 650 418 | * [16.2.2 Blocks 650 419 | * [16.2.3 Local Class Declaration Statements 651 420 | * [16.2.4 Local Variable Declaration Statements 651 421 | * [16.2.5 Labeled Statements 652 422 | * [16.2.6 Expression Statements 652 423 | * [16.2.7 if Statements 652 424 | * [16.2.8 assert Statements 653 425 | * [16.2.9 switch Statements 653 426 | * [16.2.10 while Statements 654 427 | * [16.2.11 do Statements 654 428 | * [16.2.12 for Statements 654 429 | * [16.2.12.1 Initialization Part of for Statement 655 430 | * [16.2.12.2 Incrementation Part of for Statement 656 431 | * [16.2.13 break, continue, return, and throw Statements 656 432 | * [16.2.14 synchronized Statements 656 433 | * [16.2.15 try Statements 657 434 | * [16.3 Definite Assignment and Parameters](docs/16-Definite-Assignment/16.3-Definite-Assignment-and-Parameters.md) 435 | * [16.4 Definite Assignment and Array Initializers](docs/16-Definite-Assignment/16.4-Definite-Assignment-and-Array-Initializers.md) 436 | * [16.5 Definite Assignment and Enum Constants](docs/16-Definite-Assignment/16.5-Definite-Assignment-and-Enum-Constants.md) 437 | * [16.6 Definite Assignment and Anonymous Classes](docs/16-Definite-Assignment/16.6-Definite-Assignment-and-Anonymous-Classes.md) 438 | * [16.7 Definite Assignment and Member Types](docs/16-Definite-Assignment/16.7-Definite-Assignment-and-Member-Types.md) 439 | * [16.8 Definite Assignment and Static Initializers](docs/16-Definite-Assignment/16.8-Definite-Assignment-and-Static-Initializers.md) 440 | * [16.9 Definite Assignment, Constructors, and Instance Initializers](docs/16-Definite-Assignment/16.9-Definite-Assignment-Constructors-and-Instance-Initializers.md) 441 | * [17 Threads and Locks](docs/17-Threads-and-Locks/17-Threads-and-Locks.md) 442 | * [17.1 Synchronization](docs/17-Threads-and-Locks/17.1-Synchronization.md) 443 | * [17.2 Wait Sets and Notification](docs/17-Threads-and-Locks/17.2-Wait-Sets-and-Notification.md) 444 | * [17.2.1 Wait 665 445 | * [17.2.2 Notification 666 446 | * [17.2.3 Interruptions 667 447 | * [17.2.4 Interactions of Waits, Notification, and Interruption 667 448 | * [17.3 Sleep and Yield](docs/17-Threads-and-Locks/17.3-Sleep-and-Yield.md) 449 | * [17.4 Memory Model](docs/17-Threads-and-Locks/17.4-Memory-Model.md) 450 | * [17.4.1 Shared Variables 672 451 | * [17.4.2 Actions 672 452 | * [17.4.3 Programs and Program Order 673 453 | * [17.4.4 Synchronization Order 674 454 | * [17.4.5 Happens-before Order 675 455 | * [17.4.6 Executions 678 456 | * [17.4.7 Well-Formed Executions 679 457 | * [17.4.8 Executions and Causality Requirements 679 458 | * [17.4.9 Observable Behavior and Nonterminating Executions 682 459 | * [17.5 final Field Semantics](docs/17-Threads-and-Locks/17.5-final-Field-Semantics.md) 460 | * [17.5.1 Semantics of final Fields 686 461 | * [17.5.2 Reading final Fields During Construction 686 462 | * [17.5.3 Subsequent Modification of final Fields 687 463 | * [17.5.4 Write-Protected Fields 688 464 | * [17.6 Word Tearing](docs/17-Threads-and-Locks/17.6-Word-Tearing.md) 465 | * [17.7 Non-Atomic Treatment of double and long](docs/17-Threads-and-Locks/17.7-Non-Atomic-Treatment-of-double-and-long.md) 466 | * [18 Type Inference](docs/18-Type-Inference/18-Type-Inference.md) 467 | * [18.1 Concepts and Notation](docs/18-Type-Inference/18.1-Concepts-and-Notation.md) 468 | * [18.1.1 Inference Variables 692 469 | * [18.1.2 Constraint Formulas 693 470 | * [18.1.3 Bounds 693 471 | * [18.2 Reduction](docs/18-Type-Inference/18.2-Reduction.md) 472 | * [18.2.1 Expression Compatibility Constraints 695 473 | * [18.2.2 Type Compatibility Constraints 700 474 | * [18.2.3 Subtyping Constraints 701 475 | * [18.2.4 Type Equality Constraints 702 476 | * [18.2.5 Checked Exception Constraints 704 477 | * [18.3 Incorporation](docs/18-Type-Inference/18.3-Incorporation.md) 478 | * [18.3.1 Complementary Pairs of Bounds 707 479 | * [18.3.2 Bounds Involving Capture Conversion 707 480 | * [18.4 Resolution](docs/18-Type-Inference/18.4-Resolution.md) 481 | * [18.5 Uses of Inference](docs/18-Type-Inference/18.5-Uses-of-Inference.md) 482 | * [18.5.1 Invocation Applicability Inference 710 483 | * [18.5.2 Invocation Type Inference 712 484 | * [18.5.2.1 Poly Method Invocation Compatibility 712 485 | * [18.5.2.2 Additional Argument Constraints 715 486 | * [18.5.3 Functional Interface Parameterization Inference 719 487 | * [18.5.4 More Specific Method Inference 720 488 | * 19 Syntax 489 | * To be continued ...未完待续... 490 | 491 | -------------------------------------------------------------------------------- /docs/01-Introduction/1-Introduction.md: -------------------------------------------------------------------------------- 1 | # 1 引言 2 | 3 | Java 编程语言是一种通用的、并发的、面向对象的语言。它的语法类似于 C 和 C ++,但它忽略了许多 C 和 C++ 复杂性、混乱和不安全的语言特性 Java 平台最初是为解决构建联网消费电子设备的软件问题。它被设计为支持多主机架构,并允许软件组件安全交付。为了满足这些要求,编译出来的本地代码必须解决不同网络间传输问题、可以操作各式各样的客户端,并且还要代码在这些客户端上能安全正确地运行。 4 | 5 | 万维网的普及伴随发生了一些十分有趣的事情:Web 浏览器允许数以百万计的用户共同在网上冲浪,通过很简单的方式访问丰富多样的内容。用户冲浪所使用的设备并不是其中的关键,它们仅仅是一种媒介,无论你的机器性能如何,无论你使用高速网络还是慢速的Modem,这些外界因素本质上与你所看到、听到的内容没有任何关系。 6 | 7 | 网络爱好者很快就发现,Web 的 HTML 文档格式所支持的内容过于有限。HTML 扩展,如表单,更加凸显了这些限制,而这就说明了,没有浏览器可以包含用户想要的所有功能。可扩展性是问题的答案。 8 | 9 | HotJava 浏览器展示了 Java 编程语言和平台的能够将程序嵌入 HTML 的有趣的属性。在它们一起出现在 HTML 页面时,程序会透明地下载到浏览器。在被浏览器接受之前,程序都是经过仔细检查,以确保它们是安全的。像 HTML 网页一样,程序是和网络、主机无关的。无论他们来自哪里或在什么样的机器运行,程序被加载并运行的行为方式都是相同的。 10 | 11 | Java 技术支持的网页浏览器将不再受限于它本身所提供的功能。浏览网页的用户可以放心地假定在他们机器上运行的动态内容不会损害他们的机器。软件开发人员编写一次代码,程序就可以运行在所有支持 Java 运行时环境的机器之上。 -------------------------------------------------------------------------------- /docs/01-Introduction/1.1-Organization-of-the-Specification.md: -------------------------------------------------------------------------------- 1 | # 1.1 章节组织 2 | 3 | 第2章描述了语法和用于呈现语言的词法和句法语法的符号。 4 | 5 | 第3章描述了Java编程语言的词法结构,它基于C和C++。该语言是用Unicode字符集编写的。 6 | 7 | 第4章介绍了类型、值和变量。类型细分为基本类型和引用类型。 8 | 9 | 第5章介绍了转换和数字提升。转换会更改编译时类型,有时还会更改表达式的值。 10 | 11 | 第6章描述了声明和名称,以及如何确定名称的含义(即名称表示的声明)。 12 | 13 | 第7章描述了程序的结构,它被组织成包。 14 | 15 | 16 | 第8章描述了类。 17 | 18 | 第9章介绍了接口。 19 | 20 | 第10章介绍了数组。 21 | 22 | 第11章描述了异常,这些异常是不可恢复的,并且与语言语义和并发机制完全集成。 23 | 24 | 第12章描述了在执行程序期间发生的活动。 25 | 26 | 第13章介绍了二进制兼容性,指定了对使用已更改类型但尚未重新编译的其他类型的类型更改的影响。 27 | 28 | 第14章描述了基于C和C++的块和语句。 29 | 30 | 31 | 第15章描述了表达式。本文件充分说明了表达式评估的(明显)顺序,增加了确定性和可移植性。 32 | 33 | 34 | 第16章描述了语言确保在使用前明确设置局部变量的精确方式。 35 | 36 | 第17章描述了线程和锁的语义,它们基于最初使用Mesa编程语言引入的基于监视器的并发性。 37 | 38 | 第18章描述了各种类型推断算法,用于测试泛型方法的适用性并推断泛型方法调用中的类型。 39 | 40 | 第19章介绍了该语言的语法语法。 -------------------------------------------------------------------------------- /docs/01-Introduction/1.2-Example-Programs.md: -------------------------------------------------------------------------------- 1 | # 1.2 程序示例 2 | 3 | 文本中给出的大多数示例程序都可以执行,并且形式类似于: 4 | 5 | ```java 6 | class Test { 7 | public static void main(String[] args) { 8 | for (int i = 0; i < args.length; i++) 9 | System.out.print(i == 0 ? args[i] : " " + args[i]); 10 | System.out.println(); 11 | } 12 | } 13 | ``` 14 | 15 | 在安装了Oracle JDK的计算机上,可以通过提供命令来编译和执行存储在Test.java文件中的此类: 16 | 17 | ``` 18 | javac Test.java 19 | java Test Hello, world. 20 | ``` 21 | 22 | 输出如下: 23 | 24 | ``` 25 | Hello, world. 26 | ··· -------------------------------------------------------------------------------- /docs/01-Introduction/1.3-Notation.md: -------------------------------------------------------------------------------- 1 | # 1.3 符号 2 | 3 | 4 | 在本书中,我们所使用到的类和接口来自于 Java SE 平台的 API,无论何时,我们使用某个字母(譬如N)来表示某个类或接口时,默认都是指 java.lang 包下的那个类或接口,如果要描述其他包中的类或接口,我们将会使用全限定名。 5 | 6 | 无论何时,当我们提及某个类或接口的包是 java 或者它的子包,那就意味着这个类或接口是由引导类加载器进行加载的([§5.3.1](http://docs.oracle.com/javase/specs/jvms/se11/html/jvms-5.html#jvms-5.3.1))。 7 | 8 | 无论何时,我们提及某个包是 java 包的子包时,就意味着这个包是由引导类加载器所定义的。 9 | 10 | 在本书中,下面两种字体含义为: 11 | * `fixed width`这种小字体用于 JVM 数据类型、异常、错误、class 文件结构、序言码和 Java 代码。 12 | * 斜体用于描述 Java 虚拟机中的“汇编语言”,即操作码和操作数,也包括一些 13 | JVM 运行时数据区域。有时也被用来说明一些新的条目和需要强调的内容。 14 | 15 | 非规范的信息,旨在阐明规范的,用小、缩进的文本表示。如 16 | *This is non-normative information. It provides intuition, rationale, advice, examples, etc.* -------------------------------------------------------------------------------- /docs/01-Introduction/1.4-Relationship-to-Predefined-Classes-and-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 1.4 与预定义类和接口的关系 2 | 3 | 如上所述,此规范通常是指Java SE Platform API的类。特别是,某些类与Java编程语言有特殊关系。示例包括诸如Object,Class,ClassLoader,String,Thread以及java.lang.reflect包中的类和接口等类。此规范约束此类和接口的行为,但不提供完整的规范。读者可以参考Java SE Platform API文档。 4 | 5 | 因此,本说明书没有详细描述反射。许多语言结构在Core Reflection API(java.lang.reflect)和语言模型API(javax.lang.model)中都有类似物,但这些通常不在这里讨论。例如,当我们列出可以创建对象的方式时,我们通常不包括Core Reflection API可以实现此目的的方式。读者应该了解这些额外的机制,即使文中没有提到它们。 -------------------------------------------------------------------------------- /docs/01-Introduction/1.5-Feedback.md: -------------------------------------------------------------------------------- 1 | # 1.5 反馈 2 | 3 | 读者可以通过`jls-jvms-spec-comments@openjdk.java.net`来报告本规范中的技术错误和模糊之处。 4 | 5 | 关于通过 javac 产生和操纵的 class 文件的问题,可以被发送到`compiler-dev@openjdk.java.net`。 6 | 7 | **译者注:**有管本规范的中文翻译,任何问题都可以在 提问 -------------------------------------------------------------------------------- /docs/01-Introduction/1.6-References.md: -------------------------------------------------------------------------------- 1 | # 1.6 参考引用 2 | 3 | * Apple Computer. Dylan Reference Manual. Apple Computer Inc., Cupertino, California.September 29, 1995. 4 | * Bobrow, Daniel G., Linda G. DeMichiel, Richard P. Gabriel, Sonya E. Keene, Gregor Kiczales, and David A. Moon. Common Lisp Object System Specification, X3J13 Document 88-002R, June 1988; appears as Chapter 28 of Steele, Guy. Common Lisp: The Language,2nd ed. Digital Press, 1990, ISBN 1-55558-041-6, 770-864. 5 | * Ellis, Margaret A., and Bjarne Stroustrup. The Annotated C++ Reference Manual. Addison-Wesley, Reading, Massachusetts, 1990, reprinted with corrections October 1992, ISBN 0-201-51459-1. 6 | * Goldberg, Adele and Robson, David. Smalltalk-80: The Language. Addison-Wesley, Reading, Massachusetts, 1989, ISBN 0-201-13688-0. 7 | * Harbison, Samuel. Modula-3. Prentice Hall, Englewood Cliffs, New Jersey, 1992, ISBN 0-13-596396. 8 | * Hoare, C. A. R. Hints on Programming Language Design. Stanford University Computer Science Department Technical Report No. CS-73-403, December 1973. Reprinted in SIGACT/SIGPLAN Symposium on Principles of Programming Languages. Association for Computing Machinery, New York, October 1973. 9 | * IEEE Standard for Binary Floating-Point Arithmetic. ANSI/IEEE Std. 754-1985. Available from Global Engineering Documents, 15 Inverness Way East, Englewood, Colorado 80112-5704 USA; 800-854-7179. 10 | * Kernighan, Brian W., and Dennis M. Ritchie. The C Programming Language, 2nd ed. Prentice Hall, Englewood Cliffs, New Jersey, 1988, ISBN 0-13-110362-8. 11 | * Madsen, Ole Lehrmann, Birger Møller-Pedersen, and Kristen Nygaard. Object-Oriented Programming in the Beta Programming Language. Addison-Wesley, Reading, Massachusetts, 1993, ISBN 0-201-62430-3. 12 | * Mitchell, James G., William Maybury, and Richard Sweet. The Mesa Programming Language, Version 5.0. Xerox PARC, Palo Alto, California, CSL 79-3, April 1979. 13 | * Stroustrup, Bjarne. The C++ Progamming Language, 2nd ed. Addison-Wesley, Reading, Massachusetts, 1991, reprinted with corrections January 1994, ISBN 0-201-53992-6. 14 | * Unicode Consortium, The. The Unicode Standard, Version 10.0.0. Mountain View, California, 2017, ISBN 978-1-936213-16-0. -------------------------------------------------------------------------------- /docs/02-Grammars/1.6-References.md: -------------------------------------------------------------------------------- 1 | # 2 Grammars 2 | 3 | -------------------------------------------------------------------------------- /docs/02-Grammars/2.1-Context-Free-Grammars.md: -------------------------------------------------------------------------------- 1 | # 2.1 Context-Free Grammars 2 | 3 | -------------------------------------------------------------------------------- /docs/02-Grammars/2.2-The-Lexical-Grammar.md: -------------------------------------------------------------------------------- 1 | # 2.2 The Lexical Grammar 2 | 3 | -------------------------------------------------------------------------------- /docs/02-Grammars/2.3-The-Syntactic-Grammar.md: -------------------------------------------------------------------------------- 1 | # 2.3 The Syntactic Grammar 2 | 3 | -------------------------------------------------------------------------------- /docs/02-Grammars/2.4-Grammar-Notation.md: -------------------------------------------------------------------------------- 1 | # 2.4 Grammar Notation 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3-Lexical-Structure.md: -------------------------------------------------------------------------------- 1 | # 3 Lexical Structure 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.1-Unicode.md: -------------------------------------------------------------------------------- 1 | # 3.1 Unicode 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10 Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.1-Integer-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10.1 Integer Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.2-Floating-Point-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10.2 Floating-Point Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.3-Boolean-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10.3 Boolean Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.4-Character-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10.4 Character Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.5-String-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10.5 String Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.6-Escape-Sequences-for-Character-and-String-Literals.md: -------------------------------------------------------------------------------- 1 | # 3.10.6 Escape Sequences for Character and String Literals 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.10.7-The-Null-Literal.md: -------------------------------------------------------------------------------- 1 | # 3.10.7 The Null Literal 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.11-Separators.md: -------------------------------------------------------------------------------- 1 | # 3.11 Separators 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.12-Operators.md: -------------------------------------------------------------------------------- 1 | # 3.12 Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.2-Lexical-Translations.md: -------------------------------------------------------------------------------- 1 | # 3.2 Lexical Translations 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.3-Unicode-Escapes.md: -------------------------------------------------------------------------------- 1 | # 3.3 Unicode Escapes 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.4-Line-Terminators.md: -------------------------------------------------------------------------------- 1 | # 3.4 Line Terminators 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.5-Input-Elements-and-Tokens.md: -------------------------------------------------------------------------------- 1 | # 3.5 Input Elements and Tokens 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.6-White-Space.md: -------------------------------------------------------------------------------- 1 | # 3.6 White Space 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.7-Comments.md: -------------------------------------------------------------------------------- 1 | # 3.7 Comments 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.8-Identifiers.md: -------------------------------------------------------------------------------- 1 | # 3.8 Identifiers 2 | 3 | -------------------------------------------------------------------------------- /docs/03-Lexical-Structure/3.9-Keywords.md: -------------------------------------------------------------------------------- 1 | # 3.9 Keywords 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4-Types-Values-and-Variables.md: -------------------------------------------------------------------------------- 1 | # 4 Types, Values, and Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.1-The-Kinds-of-Types-and-Values.md: -------------------------------------------------------------------------------- 1 | # 4.1 The Kinds of Types and Values 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.10-Subtyping.md: -------------------------------------------------------------------------------- 1 | # 4.10 Subtyping 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.10.1-Subtyping-among-Primitive-Types.md: -------------------------------------------------------------------------------- 1 | # 4.10.1 Subtyping among Primitive Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.10.2-Subtyping-among-Class-and-Interface-Types.md: -------------------------------------------------------------------------------- 1 | # 4.10.2 Subtyping among Class and Interface Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.10.3-Subtyping-among-Array-Types.md: -------------------------------------------------------------------------------- 1 | # 4.10.3 Subtyping among Array Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.10.4-Least-Upper-Bound.md: -------------------------------------------------------------------------------- 1 | # 4.10.4 Least Upper Bound 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.10.5-Type-Projections.md: -------------------------------------------------------------------------------- 1 | # 4.10.5 Type Projections 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.11-Where-Types-Are-Used.md: -------------------------------------------------------------------------------- 1 | # 4.11 Where Types Are Used 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12-Variables.md: -------------------------------------------------------------------------------- 1 | # 4.12 Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12.1-Variables-of-Primitive-Type.md: -------------------------------------------------------------------------------- 1 | # 4.12.1 Variables of Primitive Type 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12.2-Variables-of-Reference-Type.md: -------------------------------------------------------------------------------- 1 | # 4.12.2 Variables of Reference Type 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12.3-Kinds-of-Variables.md: -------------------------------------------------------------------------------- 1 | # 4.12.3 Kinds of Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12.4-final-Variables.md: -------------------------------------------------------------------------------- 1 | # 4.12.4 final Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12.5-Initial-Values-of-Variables.md: -------------------------------------------------------------------------------- 1 | # 4.12.5 Initial Values of Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.12.6-Types-Classes-and-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 4.12.6 Types, Classes, and Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.2 Primitive Types and Values.md: -------------------------------------------------------------------------------- 1 | # 4.2 Primitive Types and Values 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.2.1-Integral-Types-and-Values.md: -------------------------------------------------------------------------------- 1 | # 4.2.2 Integer Operations 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.2.3-Floating-Point-Types-Formats-and-Values.md: -------------------------------------------------------------------------------- 1 | # 4.2.3 Floating-Point Types, Formats, and Values 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.2.4-Floating-Point-Operations.md: -------------------------------------------------------------------------------- 1 | # 4.2.4 Floating-Point Operations 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.2.5-The-boolean-Type-and-boolean-Values.md: -------------------------------------------------------------------------------- 1 | # 4.2.5 The boolean Type and boolean Values 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.3-Reference-Types-and-Values.md: -------------------------------------------------------------------------------- 1 | # 4.3 Reference Types and Values 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.3.1-Objects.md: -------------------------------------------------------------------------------- 1 | # 4.3.1 Objects 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.3.2-The-Class-Object.md: -------------------------------------------------------------------------------- 1 | # 4.3.2 The Class Object 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.3.3-The-Class-String.md: -------------------------------------------------------------------------------- 1 | # 4.3.3 The Class String 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.3.4-When-Reference-Types-Are-the-Sam.md: -------------------------------------------------------------------------------- 1 | # 4.3.4 When Reference Types Are the Same 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.4-Type-Variables.md: -------------------------------------------------------------------------------- 1 | # 4.4 Type Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.5-Parameterized-Types.md: -------------------------------------------------------------------------------- 1 | # 4.5 Parameterized Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.5.1-Type-Arguments-of-Parameterized-Types.md: -------------------------------------------------------------------------------- 1 | # 4.5.1 Type Arguments of Parameterized Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.5.2-Members-and-Constructors-of-Parameterized-Types.md: -------------------------------------------------------------------------------- 1 | # 4.5.2 Members and Constructors of Parameterized Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.6-Type-Erasure.md: -------------------------------------------------------------------------------- 1 | # 4.6 Type Erasure 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.7-Reifiable-Types.md: -------------------------------------------------------------------------------- 1 | # 4.7 Reifiable Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.8-Raw-Types.md: -------------------------------------------------------------------------------- 1 | # 4.8 Raw Types 2 | 3 | -------------------------------------------------------------------------------- /docs/04-Types-Values-and-Variables/4.9-Intersection-Types.md: -------------------------------------------------------------------------------- 1 | # 4.9 Intersection Types 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5-Conversions-and-Contexts.md: -------------------------------------------------------------------------------- 1 | # 5 Conversions and Contexts 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5.1-Kinds-of-Conversion.md: -------------------------------------------------------------------------------- 1 | # 5.1 Kinds of Conversion 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5.2-Assignment-Contexts.md: -------------------------------------------------------------------------------- 1 | # 5.2 Assignment Contexts 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5.3-Invocation-Contexts.md: -------------------------------------------------------------------------------- 1 | # 5.3 Invocation Contexts 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5.4-String-Contexts.md: -------------------------------------------------------------------------------- 1 | # 5.4 String Contexts 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5.5-Casting-Contexts.md: -------------------------------------------------------------------------------- 1 | # 5.5 Casting Contexts 2 | 3 | -------------------------------------------------------------------------------- /docs/05-Conversions-and-Contexts/5.6-Numeric-Contexts.md: -------------------------------------------------------------------------------- 1 | # 5.6 Numeric Contexts 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6-Names.md: -------------------------------------------------------------------------------- 1 | # 6 Names 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.1-Declarations.md: -------------------------------------------------------------------------------- 1 | # 6.1 Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.2-Names-and-Identifiers.md: -------------------------------------------------------------------------------- 1 | # 6.2 Names and Identifiers 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.3-Scope-of-a-Declaration.md: -------------------------------------------------------------------------------- 1 | # 6.3 Scope of a Declaration 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.4-Shadowing-and-Obscuring.md: -------------------------------------------------------------------------------- 1 | # 6.4 Shadowing and Obscuring 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.5-Determining-the-Meaning-of-a-Name.md: -------------------------------------------------------------------------------- 1 | # 6.5 Determining the Meaning of a Name 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.6-Access-Control.md: -------------------------------------------------------------------------------- 1 | # 6.6 Access Control 2 | 3 | -------------------------------------------------------------------------------- /docs/06-Names/6.7-Fully-Qualified-Names-and-Canonical-Names.md: -------------------------------------------------------------------------------- 1 | # 6.7 Fully Qualified Names and Canonical Names 2 | 3 | -------------------------------------------------------------------------------- /docs/07-Packages-and-Modules/7-Packages-and-Modules.md: -------------------------------------------------------------------------------- 1 | # 7 Packages and Modules 2 | 3 | -------------------------------------------------------------------------------- /docs/07-Packages-and-Modules/7.1-Package-Members.md: -------------------------------------------------------------------------------- 1 | # 7.1 Package Members 2 | 3 | -------------------------------------------------------------------------------- /docs/07-Packages-and-Modules/7.2-Host-Support-for-Modules-and-Packages.md: -------------------------------------------------------------------------------- 1 | # 7.2 Host Support for Modules and Packages 2 | 3 | -------------------------------------------------------------------------------- /docs/07-Packages-and-Modules/7.3-Compilation-Units.md: -------------------------------------------------------------------------------- 1 | # 7.3 Compilation Units 2 | 3 | -------------------------------------------------------------------------------- /docs/07-Packages-and-Modules/7.4-Package-Declarations.md: -------------------------------------------------------------------------------- 1 | # 7.4 Package Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/07-Packages-and-Modules/7.7-Module-Declarations.md: -------------------------------------------------------------------------------- 1 | # 7.7 Module Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8-Classes.md: -------------------------------------------------------------------------------- 1 | # 8 Classes 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.1-Class-Declarations.md: -------------------------------------------------------------------------------- 1 | # 8.1 Class Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.2-Class-Members.md: -------------------------------------------------------------------------------- 1 | # 8.2 Class Members 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.3-Field-Declarations.md: -------------------------------------------------------------------------------- 1 | # 8.3 Field Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.4-Method-Declarations.md: -------------------------------------------------------------------------------- 1 | # 8.4 Method Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.5-Member-Type-Declarations.md: -------------------------------------------------------------------------------- 1 | # 8.5 Member Type Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.6-Instance-Initializers.md: -------------------------------------------------------------------------------- 1 | # 8.6 Instance Initializers 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.7-Static-Initializers.md: -------------------------------------------------------------------------------- 1 | # 8.7 Static Initializers 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.8-Constructor-Declarations.md: -------------------------------------------------------------------------------- 1 | # 8.8 Constructor Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/08-Classes/8.9-Enum-Types.md: -------------------------------------------------------------------------------- 1 | # 8.9 Enum Types 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 9 Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.1-Interface-Declarations.md: -------------------------------------------------------------------------------- 1 | # 9.1 Interface Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.2-Interface-Members.md: -------------------------------------------------------------------------------- 1 | # 9.2 Interface Members 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.3-Field-Constant-Declarations.md: -------------------------------------------------------------------------------- 1 | # 9.3 Field (Constant) Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.4-Method-Declarations.md: -------------------------------------------------------------------------------- 1 | # 9.4 Method Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.5-Member-Type-Declarations.md: -------------------------------------------------------------------------------- 1 | # 9.5 Member Type Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.6-Annotation-Type.md: -------------------------------------------------------------------------------- 1 | # 9.6 Annotation Types 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.7 Annotations.md: -------------------------------------------------------------------------------- 1 | # 9.7 Annotations 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.8-Functional-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 9.8 Functional Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/09-Interfaces/9.9-Function-Types.md: -------------------------------------------------------------------------------- 1 | # 9.9 Function Types 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10-Arrays.md: -------------------------------------------------------------------------------- 1 | # 10 Arrays 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.1-Array-Types.md: -------------------------------------------------------------------------------- 1 | # 10.1 Array Types 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.2-Array-Variables.md: -------------------------------------------------------------------------------- 1 | # 10.2 Array Variables 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.3-Array-Creation.md: -------------------------------------------------------------------------------- 1 | # 10.3 Array Creation 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.4-Array-Access.md: -------------------------------------------------------------------------------- 1 | # 10.4 Array Access 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.5-Array-Store-Exception.md: -------------------------------------------------------------------------------- 1 | # 10.5 Array Store Exception 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.6-Array-Initializers.md: -------------------------------------------------------------------------------- 1 | # 10.6 Array Initializers 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.7-Array-Members.md: -------------------------------------------------------------------------------- 1 | # 10.7 Array Members 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.8-Class-Objects-for-Arrays.md: -------------------------------------------------------------------------------- 1 | # 10.8 Class Objects for Arrays 2 | 3 | -------------------------------------------------------------------------------- /docs/10-Arrays/10.9-An-Array-of-Characters-Is-Not-a-String.md: -------------------------------------------------------------------------------- 1 | # 10.9 An Array of Characters Is Not a String 2 | 3 | -------------------------------------------------------------------------------- /docs/11-Exceptions/11-Exceptions.md: -------------------------------------------------------------------------------- 1 | # 11 Exceptions 2 | 3 | -------------------------------------------------------------------------------- /docs/11-Exceptions/11.1-The-Kinds-and-Causes-of-Exceptions.md: -------------------------------------------------------------------------------- 1 | # 11.1 The Kinds and Causes of Exceptions 2 | 3 | -------------------------------------------------------------------------------- /docs/11-Exceptions/11.2-Compile-Time-Checking-of-Exceptions.md: -------------------------------------------------------------------------------- 1 | # 11.2 Compile-Time Checking of Exceptions 2 | 3 | -------------------------------------------------------------------------------- /docs/11-Exceptions/11.3-Run-Time-Handling-of-an-Exception.md: -------------------------------------------------------------------------------- 1 | # 11.3 Run-Time Handling of an Exception 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12-Execution.md: -------------------------------------------------------------------------------- 1 | # 12 Execution 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.1-Java-Virtual-Machine-Startup.md: -------------------------------------------------------------------------------- 1 | # 12.1 Java Virtual Machine Startup 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.2-Loading-of-Classes-and-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 12.2 加载类和接口 2 | 3 | 加载是指查找具有特定名称的类或接口类型的二进制形式的过程。典型的做法是,查找事先由Java编译器从源代码计算而来二进制表示,但也可能是通过动态计算。 4 | 二进制形式最终会构造成一个Class对象。 5 | 6 | 加载的精确语义在Java Java Machine Specification,Java SE 11 Edition的第5章中给出。在这里,我们从Java编程语言的角度概述了该过程。 7 | 8 | 类或接口的二进制格式通常是上面引用的Java虚拟机规范Java SE 11版中描述的类文件格式,但只要满足第13.1节中规定的要求,其他格式也是可能的。 9 | 10 | 11 | 类ClassLoader的方法defineClass可用于从类文件格式的二进制表示构造Class对象。 12 | 13 | 表现良好的类加载器维护这些性质: 14 | 15 | * 给定相同的名称,一个好的类加载器应该总是返回相同的类对象。 16 | * 如果类加载器L1将类C的加载委托给另一个加载器L2,那么对于作为直接超类或C的直接超接口出现的任何类型T,或作为C中的字段类型,或作为类型方法的正式参数或 17 | C中的构造函数,或者作为C,L1和L2中方法的返回类型应该返回相同的Class对象。 18 | 19 | 恶意类加载器可能违反这些性质。但是,它不能破坏类型系统的安全性,因为Java虚拟机可以防范这种情况。 20 | 21 | *有关这些问题的进一步讨论,请参阅Java虚拟机规范,Java SE 11版和Java虚拟机中的动态类加载,作者:Sheng Liang和Gilad Bracha,作为ACO SIGPLAN发布的OOPSLA '98会议录。通告,第33卷,第10期,1998年10月,第36-44页。Java编程语言设计的基本原则是运行时类型系统不能被用Java编程语言编写的代码破坏,即使是这样的实现也是如此。否则敏感的系统类如ClassLoader和SecurityManager。* 22 | 23 | ## 12.2.1 加载过程 24 | 25 | 加载过程由类ClassLoader及其子类实现。 26 | 27 | ClassLoader的不同子类可以实现不同的加载策略。特别地,类加载器可以缓存类和接口的二进制表示,基于预期的使用来预取它们,或者将一组相关的类加载在一起。 28 | 例如,如果找不到新编译的类,因为旧版本由类加载器缓存,这些活动可能对正在运行的应用程序不完全透明。但是,类加载器的责任是仅在程序中可能出现的情况下反映加载错误,而无需预取或组加载。 29 | 30 | 如果在类加载期间发生错误,那么将在程序中(直接或间接)使用该类型的任何点抛出类LinkichError的以下子类之一的实例: 31 | 32 | * ClassCircularityError:无法加载类或接口,因为它将是自己的超类或超接口(第8.1.4节,第9.1.3节,第13.4.4节)。 33 | * ClassFormatError:声称指定所请求的编译类或接口的二进制数据格式错误。 34 | * NoClassDefFoundError:相关类加载器无法找到所请求的类或接口的定义。 35 | 36 | 因为加载涉及新数据结构的分配,所以它可能会因OutOfMemoryError而失败。 -------------------------------------------------------------------------------- /docs/12-Execution/12.3-Linking-of-Classes-and-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 12.3 Linking of Classes and Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.4-Initialization-of-Classes-and-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 12.4 Initialization of Classes and Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.5-Creation-of-New-Class-Instances.md: -------------------------------------------------------------------------------- 1 | # 12.5 Creation of New Class Instances 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.6-Finalization-of-Class-Instances.md: -------------------------------------------------------------------------------- 1 | # 12.6 Finalization of Class Instances 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.7-Unloading-of-Classes-and-Interfaces.md: -------------------------------------------------------------------------------- 1 | # 12.7 Unloading of Classes and Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/12-Execution/12.8-Program-Exit.md: -------------------------------------------------------------------------------- 1 | # 12.8 Program Exit 2 | 3 | -------------------------------------------------------------------------------- /docs/13-Binary-Compatibility/13-Binary-Compatibility.md: -------------------------------------------------------------------------------- 1 | # 13 Binary Compatibility 2 | 3 | -------------------------------------------------------------------------------- /docs/13-Binary-Compatibility/13.1-The-Form-of-a-Binary.md: -------------------------------------------------------------------------------- 1 | # 13.1 The Form of a Binary 2 | 3 | -------------------------------------------------------------------------------- /docs/13-Binary-Compatibility/13.2 What Binary Compatibility Is and Is Not.md: -------------------------------------------------------------------------------- 1 | # 13.2 What Binary Compatibility Is and Is Not 2 | 3 | -------------------------------------------------------------------------------- /docs/13-Binary-Compatibility/13.3 Evolution of Packages and Modules.md: -------------------------------------------------------------------------------- 1 | # 13.3 Evolution of Packages and Modules 2 | 3 | -------------------------------------------------------------------------------- /docs/13-Binary-Compatibility/13.4-Evolution-of-Classes.md: -------------------------------------------------------------------------------- 1 | # 13.4 Evolution of Classes 2 | 3 | -------------------------------------------------------------------------------- /docs/13-Binary-Compatibility/13.5-Evolution-of-Interface.md: -------------------------------------------------------------------------------- 1 | # 13.5 Evolution of Interfaces 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14-Blocks-and-Statements.md: -------------------------------------------------------------------------------- 1 | # 14 Blocks and Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14-Blocks.md: -------------------------------------------------------------------------------- 1 | # 14.2 Blocks 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.1-Normal-and-Abrupt-Completion-of-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.1 Normal and Abrupt Completion of Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.10-The-assert-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.10 The assert Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.11-The-switch-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.11 The switch Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.12-The-while-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.12 The while Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.13-The-do-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.13 The do Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.14-The-for-statement.md: -------------------------------------------------------------------------------- 1 | # 14.14 The for Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.15-The-break-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.15 The break Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.16-The-continue-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.16 The continue Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.17-The-return-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.17 The return Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.18-The-throw-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.18 The throw Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.19-The-synchronized-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.19 The synchronized Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.20-The-try-statement.md: -------------------------------------------------------------------------------- 1 | # 14.20 The try statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.21-Unreachable-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.21 Unreachable Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.3-Local-Class-Declarations.md: -------------------------------------------------------------------------------- 1 | # 14.3 Local Class Declarations 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.4-Local-Variable-Declaration-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.4 Local Variable Declaration Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.5-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.5 Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.6-The-Empty-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.6 The Empty Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.7-Labeled-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.7 Labeled Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.8-Expression-Statements.md: -------------------------------------------------------------------------------- 1 | # 14.8 Expression Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/14-Blocks-and-Statements/14.9-The-if-Statement.md: -------------------------------------------------------------------------------- 1 | # 14.9 The if Statement 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15 Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.1-Evaluation-Denotation-and-Result.md: -------------------------------------------------------------------------------- 1 | # 15.1 Evaluation, Denotation, and Result 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.10-Array-Creation-and-Access-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.10 Array Creation and Access Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.11-Field-Access-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.11 Field Access Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.12-Method-Invocation-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.12 Method Invocation Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.13-Method-Reference-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.13 Method Reference Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.14-Postfix-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.14 Postfix Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.15-Unary-Operators.md: -------------------------------------------------------------------------------- 1 | # 15.15 Unary Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.16-Cast-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.16 Cast Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.17-Multiplicative-Operators.md: -------------------------------------------------------------------------------- 1 | # 15.17 Multiplicative Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.18-Additive-Operators.md: -------------------------------------------------------------------------------- 1 | # 15.18 Additive Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.19-Shift-Operators].md: -------------------------------------------------------------------------------- 1 | # 15.19 Shift Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.2-Forms-of-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.2 Forms of Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.20-Relational-Operators.md: -------------------------------------------------------------------------------- 1 | # 15.20 Relational Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.21-Equality-Operators.md: -------------------------------------------------------------------------------- 1 | # 15.21 Equality Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.23-Conditional-And-Operator.md: -------------------------------------------------------------------------------- 1 | # 15.23 Conditional-And Operator && 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.24-Conditional-Or-Operator.md: -------------------------------------------------------------------------------- 1 | # 15.24 Conditional-Or Operator || 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.25-Conditional-Operator.md: -------------------------------------------------------------------------------- 1 | # 15.25 Conditional Operator ? : 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.26-Assignment-Operators.md: -------------------------------------------------------------------------------- 1 | # 15.26 Assignment Operators 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.27-Lambda-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.27 Lambda Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.28-Constant-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.28 Constant Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.3-Type-of-an-Expression.md: -------------------------------------------------------------------------------- 1 | # 15.3 Type of an Expression 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.4-FP-strict-Expression.md: -------------------------------------------------------------------------------- 1 | # 15.4 FP-strict Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.5-Expressions-and-Run-Time-Checks.md: -------------------------------------------------------------------------------- 1 | # 15.5 Expressions and Run-Time Checks 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.6-Normal-and-Abrupt-Completion-of-Evaluation.md: -------------------------------------------------------------------------------- 1 | # 15.6 Normal and Abrupt Completion of Evaluation 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.7-Evaluation-Order.md: -------------------------------------------------------------------------------- 1 | # 15.7 Evaluation Order 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.8-Primary-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.8 Primary Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/15-Expressions/15.9-Class-Instance-Creation-Expressions.md: -------------------------------------------------------------------------------- 1 | # 15.9 Class Instance Creation Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16-Definite-Assignment.md: -------------------------------------------------------------------------------- 1 | # 16 Definite Assignment 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.1-Definite-Assignment-and-Expressions.md: -------------------------------------------------------------------------------- 1 | # 16.1 Definite Assignment and Expressions 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.2-Definite-Assignment-and-Statements.md: -------------------------------------------------------------------------------- 1 | # 16.2 Definite Assignment and Statements 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.3-Definite-Assignment-and-Parameters.md: -------------------------------------------------------------------------------- 1 | # 16.3 Definite Assignment and Parameters 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.4-Definite-Assignment-and-Array-Initializers.md: -------------------------------------------------------------------------------- 1 | # 16.4 Definite Assignment and Array Initializers 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.5-Definite-Assignment-and-Enum-Constants.md: -------------------------------------------------------------------------------- 1 | # 16.5 Definite Assignment and Enum Constants 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.6-Definite-Assignment-and-Anonymous-Classes.md: -------------------------------------------------------------------------------- 1 | # 16.6 Definite Assignment and Anonymous Classes 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.7-Definite-Assignment-and-Member-Types.md: -------------------------------------------------------------------------------- 1 | # 16.7 Definite Assignment and Member Types 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.8-Definite-Assignment-and-Static-Initializers.md: -------------------------------------------------------------------------------- 1 | # 16.8 Definite Assignment and Static Initializers 2 | 3 | -------------------------------------------------------------------------------- /docs/16-Definite-Assignment/16.9-Definite-Assignment-Constructors-and-Instance-Initializers.md: -------------------------------------------------------------------------------- 1 | # 16.9 Definite Assignment, Constructors, and Instance Initializers 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17-Threads-and-Locks.md: -------------------------------------------------------------------------------- 1 | # 17 Threads and Locks 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.1-Synchronization.md: -------------------------------------------------------------------------------- 1 | # 17.1 Synchronization 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.2-Wait-Sets-and-Notification.md: -------------------------------------------------------------------------------- 1 | # 17.2 Wait Sets and Notification 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.3-Sleep-and-Yield.md: -------------------------------------------------------------------------------- 1 | # 17.3 Sleep and Yield 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.4-Memory-Model.md: -------------------------------------------------------------------------------- 1 | # 17.4 Memory Model 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.5-final-Field-Semantics.md: -------------------------------------------------------------------------------- 1 | # 17.5 final Field Semantics 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.6-Word-Tearing.md: -------------------------------------------------------------------------------- 1 | # 17.6 Word Tearing 2 | 3 | -------------------------------------------------------------------------------- /docs/17-Threads-and-Locks/17.7-Non-Atomic-Treatment-of-double-and-long.md: -------------------------------------------------------------------------------- 1 | # 17.7 Non-Atomic Treatment of double and long 2 | 3 | -------------------------------------------------------------------------------- /docs/18-Type-Inference/18-Type-Inference.md: -------------------------------------------------------------------------------- 1 | # 18 Type Inference 2 | 3 | -------------------------------------------------------------------------------- /docs/18-Type-Inference/18.1-Concepts-and-Notation.md: -------------------------------------------------------------------------------- 1 | # 18.1 Concepts and Notation 2 | 3 | -------------------------------------------------------------------------------- /docs/18-Type-Inference/18.2-Reduction.md: -------------------------------------------------------------------------------- 1 | # 18.2 Reduction 2 | 3 | -------------------------------------------------------------------------------- /docs/18-Type-Inference/18.3-Incorporation.md: -------------------------------------------------------------------------------- 1 | # 18.3 Incorporation 2 | 3 | -------------------------------------------------------------------------------- /docs/18-Type-Inference/18.4-Resolution.md: -------------------------------------------------------------------------------- 1 | # 18.4 Resolution 2 | 3 | -------------------------------------------------------------------------------- /docs/18-Type-Inference/18.5-Uses-of-Inference.md: -------------------------------------------------------------------------------- 1 | # 18.5 Uses of Inference 2 | 3 | --------------------------------------------------------------------------------