You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapter-1.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The Java programming language is strongly and statically typed. This specificati
16
16
17
17
The Java programming language is a relatively high-level language, in that details of the machine representation are not available through the language. It includes automatic storage management, typically using a garbage collector, to avoid the safety problems of explicit deallocation (as in C's free or C++'s delete). High-performance garbage-collected implementations can have bounded pauses to support systems programming and real-time applications. The language does not include any unsafe constructs, such as array accesses without index checking, since such unsafe constructs would cause a program to behave in an unspecified way.
18
18
19
-
The Java programming language is normally compiled to the bytecode instruction set and binary format defined in The Java Virtual Machine Specification, Java SE 21 Edition.
19
+
The Java programming language is normally compiled to the bytecode instruction set and binary format defined in The Java Virtual Machine Specification, Java SE 22 Edition.
20
20
21
21
1.1. Organization of the Specification
22
22
@@ -111,7 +111,7 @@ Hello, world.
111
111
112
112
Throughout this specification, we refer to classes and interfaces drawn from the Java SE Platform API. Whenever we refer to a class or interface (other than those declared in an example) using a single identifier N, the intended reference is to the class or interface named N in the package java.lang. We use the canonical name (§6.7) for classes or interfaces from packages other than java.lang.
113
113
114
-
A cross-reference within this specification is shown as (§x.y). Occasionally, we refer to concepts in the The Java Virtual Machine Specification, Java SE 21 Edition via cross-references of the form (JVMS §x.y).
114
+
A cross-reference within this specification is shown as (§x.y). Occasionally, we refer to concepts in the The Java Virtual Machine Specification, Java SE 22 Edition via cross-references of the form (JVMS §x.y).
115
115
116
116
Non-normative text, designed to clarify the normative text of this specification, is given in smaller, indented text.
117
117
@@ -143,7 +143,7 @@ The preview features defined by a given release of the Java SE Platform are enum
143
143
144
144
Preview language features are specified in standalone documents that indicate changes ("diffs") to The Java® Language Specification for that release. The specifications of preview language features are incorporated into The Java® Language Specification by reference, and made a part thereof, if and only if preview features are enabled at compile time.
145
145
146
-
Java SE 21 defines three preview language features: String Templates, Unnamed Patterns and Variables and Unnamed Classes and Instance main Methods. The standalone documents which specify these preview features are available at the Oracle web site which hosts The Java® Language Specification: https://docs.oracle.com/javase/specs/.
146
+
Java SE 22 defines three preview language features: Implicitly Declared Classes and Instance main Methods; Statements Before super(...); and String Templates. The standalone documents which specify these preview features are available at the Oracle web site which hosts The Java® Language Specification: https://docs.oracle.com/javase/specs/.
147
147
148
148
Preview APIs are specified within the Java SE API Specification for that release.
Copy file name to clipboardExpand all lines: chapter-12.txt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The chapter continues with a specification of the procedures for creation of new
34
34
35
35
The Java Virtual Machine starts execution by invoking the method main of some specified class or interface, passing it a single argument which is an array of strings. In the examples in this specification, this first class is typically called Test.
36
36
37
-
The precise semantics of Java Virtual Machine startup are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 21 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
37
+
The precise semantics of Java Virtual Machine startup are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 22 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
38
38
39
39
The manner in which the initial class or interface is specified to the Java Virtual Machine is beyond the scope of this specification, but it is typical, in host environments that use command lines, for the fully qualified name of the class or interface to be specified as a command line argument and for following command line arguments to be used as strings to be provided as the argument to the method main.
40
40
@@ -99,9 +99,9 @@ public static void main(String... args)
99
99
100
100
Loading refers to the process of finding the binary form of a class or interface with a particular name, perhaps by computing it on the fly, but more typically by retrieving a binary representation previously computed from source code by a Java compiler, and constructing, from that binary form, a Class object to represent the class or interface (§1.4).
101
101
102
-
The precise semantics of loading are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 21 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
102
+
The precise semantics of loading are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 22 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
103
103
104
-
The binary representation of a class or interface is normally the class file format described in Chapter 4 of The Java Virtual Machine Specification, Java SE 21 Edition, but other representations are possible, provided they meet the requirements specified in §13.1.
104
+
The binary representation of a class or interface is normally the class file format described in Chapter 4 of The Java Virtual Machine Specification, Java SE 22 Edition, but other representations are possible, provided they meet the requirements specified in §13.1.
105
105
106
106
12.2.1. The Loading Process
107
107
@@ -129,13 +129,13 @@ If a class loader L1 delegates loading of a class or interface C to another load
129
129
130
130
A malicious class loader could violate these properties. However, it could not undermine the security of the type system, because the Java Virtual Machine guards against this.
131
131
132
-
For further discussion of these issues, see The Java Virtual Machine Specification, Java SE 21 Edition and the paper Dynamic Class Loading in the Java Virtual Machine, by Sheng Liang and Gilad Bracha, in Proceedings of OOPSLA '98, published as ACM SIGPLAN Notices, Volume 33, Number 10, October 1998, pages 36-44. A basic principle of the design of the Java programming language is that the run-time type system cannot be subverted by code written in the Java programming language, not even by implementations of such otherwise sensitive system classes as ClassLoader and SecurityManager.
132
+
For further discussion of these issues, see The Java Virtual Machine Specification, Java SE 22 Edition and the paper Dynamic Class Loading in the Java Virtual Machine, by Sheng Liang and Gilad Bracha, in Proceedings of OOPSLA '98, published as ACM SIGPLAN Notices, Volume 33, Number 10, October 1998, pages 36-44. A basic principle of the design of the Java programming language is that the run-time type system cannot be subverted by code written in the Java programming language, not even by implementations of such otherwise sensitive system classes as ClassLoader and SecurityManager.
133
133
134
134
12.3. Linking of Classes and Interfaces
135
135
136
136
Linking is the process of taking a binary form of a class or interface and combining it into the run-time state of the Java Virtual Machine, so that it can be executed. A class or interface is always loaded before it is linked.
137
137
138
-
The precise semantics of linking are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 21 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
138
+
The precise semantics of linking are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 22 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
139
139
140
140
Three different activities are involved in linking: verification, preparation, and resolution of symbolic references.
141
141
@@ -469,7 +469,7 @@ This shows that the invocation of printThree in the constructor for class Super
469
469
470
470
12.6. Finalization of Class Instances
471
471
472
-
As of Java SE 21, the Java SE Platform Specification allows finalization of class instances to be disabled in an implementation of the Java SE Platform, in anticipation of the removal of finalization from a future release of the Java SE Platform.
472
+
As of Java SE 22, the Java SE Platform Specification allows finalization of class instances to be disabled in an implementation of the Java SE Platform, in anticipation of the removal of finalization from a future release of the Java SE Platform.
473
473
474
474
The class Object has a protected method called finalize; this method can be overridden by other classes. The particular definition of finalize that can be invoked for an object is called the finalizer of that object. Before the storage for an object is reclaimed by the garbage collector, the Java Virtual Machine will invoke the finalizer of that object.
Copy file name to clipboardExpand all lines: chapter-13.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ This chapter first specifies some properties that any binary format for the Java
78
78
79
79
13.1. The Form of a Binary
80
80
81
-
Programs must be compiled either into the class file format specified by The Java Virtual Machine Specification, Java SE 21 Edition, or into a representation that can be mapped into that format by a class loader written in the Java programming language.
81
+
Programs must be compiled either into the class file format specified by The Java Virtual Machine Specification, Java SE 22 Edition, or into a representation that can be mapped into that format by a class loader written in the Java programming language.
82
82
83
83
A class file corresponding to a class or interface declaration must have certain properties. A number of these properties are specifically chosen to support source code transformations that preserve binary compatibility. The required properties are:
0 commit comments