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
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The Java programming language is strongly and statically typed. This specificati
15
15
16
16
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.
17
17
18
-
The Java programming language is normally compiled to the bytecode instruction set and binary format defined in The Java Virtual Machine Specification, Java SE 11 Edition.
18
+
The Java programming language is normally compiled to the bytecode instruction set and binary format defined in The Java Virtual Machine Specification, Java SE 12 Edition.
19
19
20
20
1.1. Organization of the Specification
21
21
@@ -151,4 +151,4 @@ Mitchell, James G., William Maybury, and Richard Sweet. The Mesa Programming Lan
151
151
152
152
Stroustrup, Bjarne. The C++ Progamming Language, 2nd ed. Addison-Wesley, Reading, Massachusetts, 1991, reprinted with corrections January 1994, ISBN 0-201-53992-6.
153
153
154
-
Unicode Consortium, The. The Unicode Standard, Version 10.0.0. Mountain View, California, 2017, ISBN 978-1-936213-16-0.
154
+
Unicode Consortium, The. The Unicode Standard, Version 11.0.0. Mountain View, California, 2017, ISBN 978-1-936213-16-0.
Copy file name to clipboardExpand all lines: chapter-12.txt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ The chapter continues with a specification of the procedures for creation of new
33
33
34
34
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.
35
35
36
-
The precise semantics of Java Virtual Machine startup are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 11 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
36
+
The precise semantics of Java Virtual Machine startup are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 12 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
37
37
38
38
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.
39
39
@@ -98,9 +98,9 @@ public static void main(String... args)
98
98
99
99
Loading refers to the process of finding the binary form of a class or interface type 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.
100
100
101
-
The precise semantics of loading are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 11 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
101
+
The precise semantics of loading are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 12 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
102
102
103
-
The binary format of a class or interface is normally the class file format described in The Java Virtual Machine Specification, Java SE 11 Edition cited above, but other formats are possible, provided they meet the requirements specified in §13.1. The method defineClass of class ClassLoader may be used to construct Class objects from binary representations in the class file format.
103
+
The binary format of a class or interface is normally the class file format described in The Java Virtual Machine Specification, Java SE 12 Edition cited above, but other formats are possible, provided they meet the requirements specified in §13.1. The method defineClass of class ClassLoader may be used to construct Class objects from binary representations in the class file format.
104
104
105
105
Well-behaved class loaders maintain these properties:
106
106
@@ -110,7 +110,7 @@ If a class loader L1 delegates loading of a class C to another loader L2, then f
110
110
111
111
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.
112
112
113
-
For further discussion of these issues, see The Java Virtual Machine Specification, Java SE 11 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.
113
+
For further discussion of these issues, see The Java Virtual Machine Specification, Java SE 12 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.
114
114
115
115
12.2.1. The Loading Process
116
116
@@ -134,7 +134,7 @@ Linking is the process of taking a binary form of a class or interface type and
134
134
135
135
Three different activities are involved in linking: verification, preparation, and resolution of symbolic references.
136
136
137
-
The precise semantics of linking are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 11 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
137
+
The precise semantics of linking are given in Chapter 5 of The Java Virtual Machine Specification, Java SE 12 Edition. Here we present an overview of the process from the viewpoint of the Java programming language.
138
138
139
139
This specification allows an implementation flexibility as to when linking activities (and, because of recursion, loading) take place, provided that the semantics of the Java programming language are respected, that a class or interface is completely verified and prepared before it is initialized, and that errors detected during linkage are thrown at a point in the program where some action is taken by the program that might require linkage to the class or interface involved in the error.
Copy file name to clipboardExpand all lines: chapter-13.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -71,11 +71,11 @@ We encourage development systems to provide facilities that alert developers to
71
71
72
72
This chapter first specifies some properties that any binary format for the Java programming language must have (§13.1). It next defines binary compatibility, explaining what it is and what it is not (§13.2). It finally enumerates a large set of possible changes to packages (§13.3), classes (§13.4), and interfaces (§13.5), specifying which of these changes are guaranteed to preserve binary compatibility and which are not.
73
73
74
-
Occasionally, references of the form: (JVMS §x.y) are used to indicate concepts from The Java Virtual Machine Specification, Java SE 11 Edition.
74
+
Occasionally, references of the form: (JVMS §x.y) are used to indicate concepts from The Java Virtual Machine Specification, Java SE 12 Edition.
75
75
76
76
13.1. The Form of a Binary
77
77
78
-
Programs must be compiled either into the class file format specified by The Java Virtual Machine Specification, Java SE 11 Edition, or into a representation that can be mapped into that format by a class loader written in the Java programming language.
78
+
Programs must be compiled either into the class file format specified by The Java Virtual Machine Specification, Java SE 12 Edition, or into a representation that can be mapped into that format by a class loader written in the Java programming language.
79
79
80
80
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:
Copy file name to clipboardExpand all lines: chapter-15.txt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -862,7 +862,7 @@ The process specified in §15.12.2, modified to handle constructors, is used to
862
862
863
863
If there is no unique most-specific constructor in the direct superclass of C that is both applicable and accessible, then a compile-time error occurs (as in method invocations).
864
864
865
-
Otherwise, C's anonymous constructor is chosen as the constructor of C (§15.9.5.1). Its body consists of an explicit constructor invocation of the constructor chosen in the direct superclass of C.
865
+
Otherwise, C's anonymous constructor is chosen as the constructor of C (§15.9.5.1). Its body consists of an explicit constructor invocation (§8.8.7.1) of the constructor chosen in the direct superclass of C.
866
866
867
867
The throws clause of the chosen constructor includes the exceptions in the throws clause of the constructor chosen in the direct superclass of C.
868
868
@@ -908,7 +908,7 @@ The throws clause of the chosen constructor is the same as the throws clause det
908
908
909
909
The return type corresponding to the chosen constructor is the return type determined for mj (§15.12.2.6).
910
910
911
-
If C is an anonymous class, then C's anonymous constructor is chosen as the constructor of C. Its body consists of an explicit constructor invocation of cj.
911
+
If C is an anonymous class, then C's anonymous constructor is chosen as the constructor of C. Its body consists of an explicit constructor invocation (§8.8.7.1) of cj.
912
912
913
913
The throws clause of the chosen constructor includes the exceptions in the throws clause determined for mj.
914
914
@@ -946,7 +946,7 @@ The new object contains new instances of all the fields declared in the specifie
946
946
947
947
Next, the actual arguments to the constructor are evaluated, left-to-right. If any of the argument evaluations completes abruptly, any argument expressions to its right are not evaluated, and the class instance creation expression completes abruptly for the same reason.
948
948
949
-
Next, the selected constructor of the specified class type is invoked. This results in invoking at least one constructor for each superclass of the class type. This process can be directed by explicit constructor invocation statements (§8.8) and is specified in detail in §12.5.
949
+
Next, the selected constructor of the specified class type is invoked. This results in invoking at least one constructor for each superclass of the class type. This process can be directed by explicit constructor invocation statements (§8.8.7.1) and is specified in detail in §12.5.
950
950
951
951
The value of a class instance creation expression is a reference to the newly created object of the specified class. Every time the expression is evaluated, a fresh object is created.
952
952
@@ -2420,7 +2420,7 @@ Otherwise, an instance method is to be invoked and there is a target reference.
2420
2420
2421
2421
If the invocation mode is super, overriding is not allowed. Method m of class or interface C is the one to be invoked. If m is abstract, an AbstractMethodError is thrown.
2422
2422
2423
-
Otherwise, if the invocation mode is virtual, and T and m jointly indicate a signature polymorphic method (§15.12.3), then the target object is an instance of java.lang.invoke.MethodHandle or java.lang.invoke.VarHandle. The target object encapsulates state which is matched against the information associated with the method invocation at compile time. Details of this matching are given in The Java Virtual Machine Specification, Java SE 11 Edition and the Java SE Platform API. If matching succeeds, then either the method referenced by the java.lang.invoke.MethodHandle instance is directly and immediately invoked, or the variable represented by the java.lang.invoke.VarHandle instance is directly and immediately accessed, and in either case the procedure in §15.12.4.5 is not executed. If matching fails, then a java.lang.invoke.WrongMethodTypeException is thrown.
2423
+
Otherwise, if the invocation mode is virtual, and T and m jointly indicate a signature polymorphic method (§15.12.3), then the target object is an instance of java.lang.invoke.MethodHandle or java.lang.invoke.VarHandle. The target object encapsulates state which is matched against the information associated with the method invocation at compile time. Details of this matching are given in The Java Virtual Machine Specification, Java SE 12 Edition and the Java SE Platform API. If matching succeeds, then either the method referenced by the java.lang.invoke.MethodHandle instance is directly and immediately invoked, or the variable represented by the java.lang.invoke.VarHandle instance is directly and immediately accessed, and in either case the procedure in §15.12.4.5 is not executed. If matching fails, then a java.lang.invoke.WrongMethodTypeException is thrown.
2424
2424
2425
2425
Otherwise, the invocation mode is interface or virtual.
2426
2426
@@ -2450,7 +2450,7 @@ If the method to be invoked is default, and more than one default method appears
2450
2450
2451
2451
If the invocation mode is interface and the method to be invoked is neither public nor private, an IllegalAccessError is thrown.
2452
2452
2453
-
The above procedure (if it terminates without error) will find a non-abstract, accessible method to invoke, provided that all classes and interfaces in the program have been consistently compiled. However, if this is not the case, then various errors may occur, as specified above; additional details about the behavior of the Java Virtual Machine under these circumstances are given by The Java Virtual Machine Specification, Java SE 11 Edition.
2453
+
The above procedure (if it terminates without error) will find a non-abstract, accessible method to invoke, provided that all classes and interfaces in the program have been consistently compiled. However, if this is not the case, then various errors may occur, as specified above; additional details about the behavior of the Java Virtual Machine under these circumstances are given by The Java Virtual Machine Specification, Java SE 12 Edition.
2454
2454
2455
2455
The dynamic lookup process, while described here explicitly, will often be implemented implicitly, for example as a side-effect of the construction and use of per-class method dispatch tables, or the construction of other per-class structures used for efficient dispatch.
Copy file name to clipboardExpand all lines: chapter-17.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ Similarly, notifications cannot be lost due to interrupts. Assume that a set s o
141
141
142
142
at least one thread in s must return normally from wait, or
143
143
144
-
all of the threads in s must exit wait by throwing InterruptedException
144
+
all of the threads in s must exit wait by throwing InterruptedException.
145
145
146
146
Note that if a thread is both interrupted and woken via notify, and that thread returns from wait by throwing an InterruptedException, then some other thread in the wait set must be notified.
Copy file name to clipboardExpand all lines: chapter-3.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Programs are written using the Unicode character set. Information about this cha
34
34
35
35
The Java SE Platform tracks the Unicode Standard as it evolves. The precise version of Unicode used by a given release is specified in the documentation of the class Character.
36
36
37
-
Versions of the Java programming language prior to JDK 1.1 used Unicode 1.1.5. Upgrades to newer versions of the Unicode Standard occurred in JDK 1.1 (to Unicode 2.0), JDK 1.1.7 (to Unicode 2.1), Java SE 1.4 (to Unicode 3.0), Java SE 5.0 (to Unicode 4.0), Java SE 7 (to Unicode 6.0), Java SE 8 (to Unicode 6.2), Java SE 9 (to Unicode 8.0), and Java SE 11 (to Unicode 10.0).
37
+
Versions of the Java programming language prior to JDK 1.1 used Unicode 1.1.5. Upgrades to newer versions of the Unicode Standard occurred in JDK 1.1 (to Unicode 2.0), JDK 1.1.7 (to Unicode 2.1), Java SE 1.4 (to Unicode 3.0), Java SE 5.0 (to Unicode 4.0), Java SE 7 (to Unicode 6.0), Java SE 8 (to Unicode 6.2), Java SE 9 (to Unicode 8.0), Java SE 11 (to Unicode 10.0), and Java SE 12 (to Unicode 11.0).
38
38
39
39
The Unicode standard was originally designed as a fixed-width 16-bit character encoding. It has since been changed to allow for characters whose representation requires more than 16 bits. The range of legal code points is now U+0000 to U+10FFFF, using the hexadecimal U+n notation. Characters whose code points are greater than U+FFFF are called supplementary characters. To represent the complete range of characters using only 16-bit units, the Unicode standard defines an encoding called UTF-16. In this encoding, supplementary characters are represented as pairs of 16-bit code units, the first from the high-surrogates range, (U+D800 to U+DBFF), the second from the low-surrogates range (U+DC00 to U+DFFF). For characters in the range U+0000 to U+FFFF, the values of code points and UTF-16 code units are the same.
0 commit comments