![]() |
![]() |
The most significant language change has been the addition of nested classes (often called inner classes). For more comprehensive details, see the nested classes specification.
In addition, various questions have arisen over time with respect to The Java Language Specification. This has prompted us to issue a series of clarifications and amendments to the specification, given below. We will be issuing amendments on an ongoing basis, as the need arises.
Please send any technical remarks you might have to docwebmaster@java.sun.com. We look forward to your comments.
The first component of a unique package name is always written in all-lowercase
ASCII letters and should be one of
the top-level domain names, currently com, edu, gov, mil, net, org,
or one of the English two-letter codes identifyingcountries as specified
in ISO Standard 3166, 1981.
ConstantDeclaration: ConstantModifiers_opt Type VariableDeclarator ConstantModifiers: ConstantModifier ConstantModifier ConstantModifiers ConstantModifier: one of public static finalEvery field declaration in the body of an interface is implicitly public,static, and final. It is permitted, but strongly discouraged as a matter of style, to redundantly specify any or all of these modifiers for such fields. It is a compile time error if the same modifier appears more than once in a field declaration.
A class or interface may be unloaded if and only if its class loader is unreachable (the definition of unreachable is given in JLS 12.6.1). Classes loaded by the bootstrap loader may not be unloaded.
Here is a brief technical rationale for this statement.
A compile-time constant expression is an expression denoting a value of primitive type or null or a String that is composed using only the following:* Literals of primitive type, null and literals of type String
Whenever it is invoked on the same object more than once during an execution of a Java application, hashCode must consistently return the same integer, provided no information used in equals comparisons on the object is modified.
The lexical syntax rule and the surrounding text in both JLS 20.9.17 and 20.10.16 should read:
The rest of s should constitute a FloatValue as described by the lexical rule:
FloatValue: Sign_opt FloatingPointLiteralwhere Sign and FloatingPointLiteral are as defined in section 3.10.2.
The final paragraph in both sections will be deleted as well.
The Java Virtual Machine Specification 4.4.5 contains the same typos.
To bring the implementation into accord with the specification and to fix the performance problems, we are modifying the specification and implementation in tandem. The new String hash function as of JDK1.2 is specified to be:
s[0] * 31^(n-1) + s[1] * 31^(n-2) + ... + s[n-1]
where s[i] is the ith character of string s.
This change should not have an effect on the majority of Java applications. If an application has persistent data that depends on actual String hash values, it could theoretically be affected. The serialized representation of a Hashtable does NOT depend on the actual hash values of the keys stored in the Hashtable. Thus, applications relying on serialization for storage of persistent data will not be affected.
This value is always less than the current value returned by the totalMemory methodThis does not change the meaning in any way, but eliminates potential misunderstandings.
The method causes the current thread to yield, allowing the thread scheduler to choose a runnable thread (possibly the thread that is yielding) for execution.
This does not change the meaning in any way, but eliminates potential misunderstandings. The revised wording makes it clear that even if other runnable threads are available, there is no guarantee that they will be run rather than the thread which calls yield().
The general contract for the isEmpty method ...
whereas the text should readThe general contact for the get method ...
JLS 21.9.8 - 21.9.12 contain typographical errors. The description of the method implementation in each of these sections first begins with the textThe method setSeed is implemented ...
^
The text should give the name of the appropriate method for each section.