站内搜索: 请输入搜索关键词
当前页面: 图书首页 > The Java Language Specification 2nd

The Java Language Specification 2nd

Contents | Prev | Next | Index Java Language Specification
Second Edition


A

abrupt completion
See completion, abrupt
abstract modifier
See also declarations; modifiers
classes
anonymous are never, 335
binary compatibility considerations, 257
declaration of, 135
definition and characteristics, 135
direct superinterface relationship to, 142
methods
binary compatibility considerations, 268
classes, 170
declaration examples, 167, 205
interfaces, 205
overloading, 207, 208
overriding, 207
semicolon as body of, 176
and super method invocation, 355
access
See also scope
accessibility
determining, 105
term definition, 104
array, 211
expression evaluation order, 365
constructor, binary compatibility considerations, 261
of fields, expression evaluation, 341
inheritance of class members, example
default, 149
private, 151
protected, 150
public, 150
interface member names, 202
method, binary compatibility considerations, 267
non-public class instances, through public superclasses and superinterfaces, 151
overridden methods, using super keyword, 178
qualified
See also field access expressions; method invocation expressions
term definition, 104
access control
See also security
classes, example, 107
constructors
default, example, 108
private, example, 111
protected, example, 110
public, example, 109
fields
default, example, 108
private, example, 111
protected, example, 110
public, example, 109
methods
default, example, 108
private, example, 111
protected, example, 110
public, example, 109
package names, limited significance of, 120
protected, details of, 105
and qualified names, 104
term definition, 104
accessible
default for top-level types, 129
package, term definition, 105
single-type import must name a type that is, 126
type or package may not be named by type-import-on-demand if not, 127
types, members and constructors, term definition, 104
actions
See also methods
main memory subsystem
lock, 431
read, 431
unlock, 431
write, 431
prescient store, with threads, 438
thread
assign, 431
load, 431
lock, 431
store, 431
unlock, 431
use, 431
threads, constraints on relationships among, 433
algebraic identities
See also expressions; mathematical functions
limits on use of, 325
alphabet
See also syntax
components
See characters
data types
See primitive types
term definition, 9
ambiguity
See also names, ambiguous; scope
avoiding, in fields with multiple inheritance, 166
avoiding, in types with multiple inheritance, 188, 208
anonymous class, 135
See also inner class
and checked exceptions in initializers, 221
definite assignment before, 426
determining immediately enclosing instance when instantiating, 332
example(s), 161, 194
exceptions in instance initializer, 189
in an explicit constructor invocation, 194
interaction with shadowing of parameter names, 168
in an interface variable initializer, 204
protected accessibility of superclass constructor, 106
supertypes classified as type names, 95
term definition, 330
argument
See also parameters
lists, evaluation order, 326
values, method invocation conversion context, 71
arithmetic
See also floating point; integers; numbers; operators; primitive types
integer division, ArithmeticException, 321
operators, numeric promotion, specification, 77
arrays
See also classes; data structures
(chapter), 209
access, 211
expression evaluation order, 364
assignment, expression evaluation order, 394
character, distinguished from strings, 215
Class
objects, 215
obtaining, example, 53
Cloneable interface implemented by, 214
components
See also variables
assignment, run-time testing, 216, 320, 395, 400
default values, 51
initialization, 213
as a kind of variable, 48
type declaration, 213
creation, 42, 211
expression evaluation, 338
order, 338
out-of-memory detection, example, 340
example, 210
exceptions, ArrayStoreException, 217
indexing of, 211
initialization, 211, 212
members, 92, 213
names, fully qualified, 111
Object as superclass of, 215
origin, 211
variables
declaration, 210
initialization, 210
ASCII characters
See also characters; Unicode character set
Unicode character set relationship to, 14
assignment
See also fields; initialization
array, expression evaluation order, 394, 399
assignable to, term definition, 66
compatible, term definition, 66
compound
evaluation order, 323
operators, evaluation, 398
conversion context, specification, 56, 66
definite, (chapter), 407
expressions
boolean, definite assignment, 412
definite assignment, 412
as statements, 287
operation, to change value of primitive value, 33
simple operators, evaluation, 393

B

backslash (\)
escape sequence, 28
Unicode escape use, 15
backspace
escape sequence, 29
Bartleby
Project (Columbia University), xxii
base
See also numbers
permitted in integer literals, 21
Beta, 3, 7
biblical quotations
I Corinthians 14:40, 322
John 3:30, 369
Matthew 6:29, 209
bibliographic references
Dynamic Class Loading in the Java Virtual Machine, 232
Polling Efficiently on Stock Hardware, 224
Release-to-Release Binary Compatibility in SOM, 251
binary
compatibility
See also code generation; compile-time errors; exceptions
(chapter), 251
changes that do not break, 252
compatible with, term definition, 256
contrasted with source compatibility, 257
file format, required properties, 253
name
See name, binary
numeric promotion, specification, 79
representation, verification of classesand interfaces, 232
blank final
field
class variable must be assigned by static initializer, 156
definite [un]assignment of, 418
definite assignment of, 407
instance variable must be assigned by every constructor, 156
notation for definite assignment, 412
restrictions in an inner class, 141
variable
definite unassignment of, 407
notation for definite unassignment, 412
blocks
See also control flow; statements
(chapter), 275
definite assignment, 418
enclosing, 141
in scope of exception handler parameters, 86, 306
in scope of local class, 86, 278
in scope of local variable, 85, 280
specification and execution of, 277
Bobrow, Daniel G., 6
body
See also declarations
class
declarations in, 147
term definition, 147
constructor, 192
binary compatibility considerations, 270
interface, declarations, 202
method, 176
binary compatibility considerations, 270
boolean
See also numbers
literals, term definition and specification, 25
operators, 40
types and values, term definition and specification, 40
bootstrap loader
See class loaders, bootstrap
brackets ([])
array type declaration, 41, 209, 280
break statement
See also control flow
definite assignment, 423
as reason for abrupt completion, 276
specification, 297
Burke, Edmund, 275
Burroughs, Edgar Rice, 301
Burton, Robert, xxiii
but not phrase
grammar notation use, 12
byte type
See also integral types; numbers; primitive types
value range, 33

C

C, 1, 2, 7
C++, 1, 2, 6
Caesar, Julius, 374
caller
of a statement, term definition, 222
carriage return (CR)
escape sequence, 29
handling in a
character literal, 26
string literal, 27
as a line terminator, not input character, 16
casting
See also conversion
boolean, 41
conversion context, 56
specification, 72
floating-point types, 38
integral types, 34
reference types, 73
run-time testing, 320
to void, not permitted, 287
catch clause, 303
See also control flow; try statement
exception handling role of, 219
exception idiom defined with, 226
scope of parameters, 86, 306
Cervantes, Migel de, 72
characters
See also numbers; primitive types; strings
array of, distinguished from strings, 215
char type, 31
See also integral types; numbers; primitive types
value range, 33
line terminators, 27
literals
escape sequences for, 28
term definition and specification, 26
Unicode character set
composite, contrasted with the Unicode decomposed characters, 20
handling in package names, 122
lexical grammar use as terminal symbols, 9
relationship to ASCII, 14
Chase, Lincoln, 118
checking
See also exceptions, checked; throw
for exception handlers, at compile-time, 221
Christie, Agatha, 276, 288, 347
circular declaration
of a class
compile-time error caused by, 144
example involving a local class, 278
link-time error caused by, 144
of an interface, compile-time error caused by, 201
of types, in different compilation units, legality of, 123
class literal, 95
class or interface name in a, 82
is a primary expression, 327
term definition, 328
class loaders
bootstrap, 248
and class unloading, 248
class(es)
See also fields; inheritance; interfaces; methods; packages; subclasses; superclasses; superinterfaces
(chapter), 135
abstract, 137
as array component types, 210
binary compatibility considerations, 257
overriding abstract methods in, 170
uses, 139
accessibility, 105
anonymous
See anonymous class
binary compatibility considerations, 257
binary representation
binary file format requirements, 256
verification of, 230
body
declarations, binary compatibility considerations, 259
term definition and declarations in, 147
.class suffix, as name for compiled files, 122
Class objects, associated with arrays, 215
constructors, binary compatibility considerations, 267
declarations, 136
specifying direct superclasses in, 142
specifying direct superinterfaces in, 144
term definition, 136
as declared entity, 81
exceptions
ClassCastException, 75
Error, 221, 226
Exception, 226
RuntimeException, 222, 226
Throwable, 219, 221, 226
final
binary compatibility considerations, 258
declaration of, 139
finalization of, 258
FP-strict, 319
inaccessible, accessing members of, 151 example, 151
initialization, 236
detailed procedure, 239
example, 231
instances
See instance(s)
instantiation, preventing, 190
linking
initialization, 227, 230, 239
preparation, 227, 234, 239
process description, 234
resolution, 230
at virtual machine startup, 230
loading, 232
errors
ClassCircularityError, 233
ClassFormatError, 233
NoClassDefFoundError, 233
process description, 233
at virtual machine startup, 230
local
See local class
member
See member class
members, 90
declarations, 147
binary compatibility considerations, 259
methods
class, 171
interface, 205
non-static, 172
static, 171
named, 135
and checked exceptions in initializers, 221
names, fully qualified, 111
naming conventions, 114
nested
See nested classes
non-public, in example of qualified names and access control, 107
preparation, 234
at virtual machine startup, 230
preventing instantiation of, 139
public
access control in, 105
binary compatibility considerations, 258
in example of qualified names and access control, 107
references to, binary file format requirements, 253
resolution
exceptions
IllegalAccessError, 235
IncompatibleClassChangeError, 235
InstantiationError, 235
NoSuchFieldError, 236
NoSuchMethodError, 236
process description, 235
at virtual machine startup, 230
scope of, 85, 125
in scope of an imported type, 85, 125
static initializers, 189
binary compatibility considerations, 271
that depend on themselves
See circular declaration, of a class
that directly depend on a reference type
See circular declaration, of a class
top-level
See top-level class
type declarations, as members of packages, 129
unloading of, 248
variables
default values, 51
specification, 48, 155
verification, at virtual machine startup, 230
classification
reclassification of contextually ambiguous names, 96
syntactic, of a name according to context, 94
code generation
See also binary, compatibility; compile-time errors; exceptions; optimization
asynchronous exceptions, implications for, 224
initialization, implications for, 241
symbolic reference resolution, implications of, 235
comments
term definition and specification, 18
Common Lisp, 6
compatibility
See binary, compatibility
compilation
See also compile-time errors; exceptions; virtual machine
CompilationUnit goal symbol, syntactic grammar use, 10
conditional
binary compatibility considerations, 265
if statement reachability handling to support, 314
exception handlers checked for during, 221
unit
components, package declarations, 124
and default accessibility of top-level types, 129
implicitly starts with import java.lang.*, 128
importing types into, 125
and meaning of a simple type name, 99
and name of top-level type, 129
overview, 119
and package membership, 89, 119
and package observability, 125
and scope of an import declaration, 85, 125
term definition and characteristics, 123
compile-time constant
See constants
compile-time errors
See binary, compatibility; errors; exceptions
completion, 276
See also control flow, exceptions
abrupt
break statement, 297
continue statement, 299
disallowed for static initializers, 189
during expression evaluation, 320
for statement, 295
labeled statements, 286
reasons for, 276, 321
return statement, 301
synchronized statement, 304
throw statement, 302
try statement, 305
try-catch statement, 307
try-catch-finally statement, 308
normal
during expression evaluation, 320
during statement execution, 276
required for instance initializers, 189
required for static initializers, 189
component(s)
See also arrays, components
type, arrays, 210
conflicts
name
See also hiding; obscuring; scope; shadowing
avoiding through use of syntactic context, 94
Conner, Michael, 251
constants
See also fields; class; final; fields, interface; literals
are always FP-strict, 319
characteristics and binary compatibility considerations, 264
compile-time narrowing of
by assignment conversion, implications, 66
not permitted by method invocation conversion, 71
expressions, 405
field, term specification, 264
may be declared in inner class, 140
named
See fields; class; final
constructors
See also class(es); execution; initialization; interfaces; methods
access, 105
binary compatibility considerations, 261
control
default, example, 108
private, example, 111
protected, example, 110
public, example, 109
hidden fields, this keyword use for, 283
accessibility, 105
allow field access through super, 344
anonymous
term definition, 335
anonymous class
cannot have explicitly declared, 335
has anonymous constructor, 335
are not members, 148
body, 192
binary compatibility considerations, 270
as components of a class body, 147
declarations, 190
binary compatibility considerations, 267
default, 195
definite assignment and unassignment within, 427
definite assignment of variables before, 418
deleting, binary compatibility considerations, 267
determining arguments to, 334
each must declare exceptions from instance initializers, 188
explicit invocation statements, 193
explicit invocations, 105
FP-strict, 319
invocation, during instance creation, 242
modifiers, 191
must assign all blank final instance variables, 156
must assign blank final fields, 156
names of, 83, 190
as non-members of a class, 90
overloading, 195
binary compatibility considerations, 270
parameters, 191
See also arguments
assignment during instance creation, 242
binary compatibility considerations, 267
definite [un]assignment of, 425
must not be assigned if final, 168
shadowing, 86, 168
specification, 51, 191
private, preventing instantiation with, 139, 197
protected, accessibility of, 105, 106
signature, 191
binary file format requirements, 255
throws clause, binary compatibility considerations, 270
and unreachable statements, 310
when reachable, 311
context(s)
See also inheritance; scope
conversion, 56
assignment, specification, 66
casting, specification, 72
method invocation, specification, 71
reclassification of contextually ambiguous names, 96
role in determining the meaning of a name, 81, 93
static
See static context
syntactic classification of a name according to, 94
context-free grammars
See grammars, context-free
continue statement
See also control flow
definite assignment, 423
as reason for abrupt completion, 276
specification, 299
contract
See also binary, compatibility
term definition, 256
control flow
See also completion; definite assignment; exceptions; expressions; statements; statements, unreachable; threads
boolean expressions use for, 40
break statement, specification, 297
continue statement, specification, 299
deadlock avoidance, multiple lock use for, 305
do statement, specification, 293
for statement, specification, 295
if statement, dangling else handling, 284
if-then statement, specification, 288
if-then-else statement, specification, 288
local variable declaration and switch statement, 49
return statement, specification, 301
switch statement, specification, 288
synchronized statement, specification, 304
throw statement, specification, 302
try statement, specification, 305
try-catch statement, specification, 307
try-catch-finally statement, specification, 308
while statement, specification, 292
conventions
naming, 113
impact on obscuring of names, 89
conversion
See also casting; numbers; promotion
(chapter), 55
casting, 72
contexts
assignment, specification, 66
casting, specification, 72
method invocation, specification, 71
forbidden, specification, 64
identity
in assignment conversion context, 66
in casting conversion context, 72
in method invocation conversion context, 71
specification, 58
kinds of, 58
in method invocations, 71
narrowing
primitive
in assignment conversion context, 66
in casting conversion context, 72
not allowed in method invocation conversion context, reasons for, 71
reference, in casting conversion context, 72
reference
narrowing, 63
widening, 62
string, 72
specification, 64
term definition, 55
value set
in assignment conversion, 66
in binary numeric promotion, 79
in casting conversion, 72
in method invocation conversion, 71
in overview, 56
term definition, 65
in unary numeric promotion, 78
widening
primitive
in assignment conversion context, 66
in binary numeric promotion context, 79
in casting conversion context, 72
in method invocation conversion context, 71
in unary numeric promotion context, 78
reference, 62
in assignment conversion context, 66
in casting conversion context, 72
in method invocation conversion context, 71
term specification, 62
creation
See also declaration; initialization
array, 42, 211
expression evaluation
example, 339
order, 338
out-of-memory detection, example, 340
instance, 42
expression evaluation order, 334
expressions as statements, 286
invocation of initializers for instance variables during, 244
method dispatching during, 244
specification and procedure, 241
object, 42
threads, 445
Creatore, Luigi, 30

D

Danforth, Scott, 251
dangling else
See also control flow
handling of, 284
data
See also constants; fields; variables
structures
See arrays; classes; interfaces; primitive types; vectors
types
See types
values
See values
database
storing packages in, 119
deadlock
avoidance, multiple lock use for, 305
decimal
See also numbers
base, permitted in integer literals, 21
numerals, specification, 21
declarations
See also body; execution; methods; parameters; statements
class
(chapter), 135
body, 147
member, 147
term definition and specification, 135
constructor, 190
field(s), 153
constants in interfaces, 203
examples of, 162
interface, examples, 204
identifiers in, kept separate from those in labeled statements, 84
import
example, 128
single-type, 126
term definition, 125
type-import-on-demand, 127
instance variable, 48
interface, 200
(chapter), 199
body, 202
members, 202
local variable, definite assignment, 419
method(s), 167
examples of, 180
interface, abstract, 205
modifiers
See
abstract modifier; final modifier; native modifier; private modifier; protected modifier; public modifier; static modifier; synchronized modifier; transient modifier; volatile modifier
overriding, example, 180
package, in compilation units, 123
scope of, 85
shadowed, term definition, 86
shadowing, 86
subclass, 142
superclass, 142
superinterface, 144, 201
term definition, 82
type
as members of packages, 129
need not appear before use of the type, 86
usage in, 46
variable
array, 210
local, 279
execution of, 283
declarator
in scope of local variable, 85, 86, 280, 296
definite assignment
See also exceptions; execution; scope
(chapter), 407
and anonymous classes, 426
of blank final class variables, 156
of instance variables, 156
and local classes, 418
of member types, 426
and parameters, 425
and qualified class instance creation, 417
requirement for locals and parameters before an inner class, 141
and static initializers, 426
of variables with respect to nested classes, 418
definite unassignment, 407
See also definite assignment
hypothetical analysis of, 412
and local classes, 418
and qualified class instance creation, 417
and static initializers, 426
DeMichiel, Linda G., 6
denormalized
IEEE 754 standard, support required for, 38
digits
Java, term definition, 19
directly depends
class, term definition, 144
division
See also arithmetic; numbers
integer divide by zero, indicated by ArithmeticException, 34, 375
do statement
See also control flow
definite assignment, 421
specification, 293
double quote
escape sequence, 29
in string literals, 27
double type
floating-point literal specification, 24
Duff's device, 289
Dylan, 6

E

Eco, Umberto, 118
Eisenhower, Dwight D., 388
element type
arrays, term definition, 210
Ellis, Margaret A., 6
Ellison, Shirley, 118
entity
declared, list of, 82
Epictetus, 203
errors
class variable initializers may not refer to instance variables, 159
Error class, unchecked exceptions as subclass of, 176
linking, 227, 234
resolution, 235
verification, 234
loading, 227, 233
reasons for, 220
semantic, exceptions as mechanism for signaling, 219
types, run-time, 320
unchecked, reasons for, 221
virtual machine, 227
escapes
sequences, for character and string literals, 28
Unicode, specification, 14
evaluation
See also execution; initialization; scope
evaluated, term definition, 317
expressions
additive operators, 377
additive operators for numeric types, 381
array access, 364
array assignment, 393
array creation, 338
assignment operators, 392
bitwise binary operators, 388
bitwise complement, 371
boolean equality operators, 388
boolean logical operators, 389
cast, 372
compound assignment operators, 398
conditional operator, 391
conditional-and operator, 390
conditional-or operators, 390
division, 374
equality operators, 386
field access, 341
instance creation, 334
integer bitwise operators, 389
logical binary operators, 388
logical complement, 371
method invocation, 345
method invocation, order of, 356
multiplication, 373
multiplicative operators, 373
numeric comparison, 384
numeric equality operators, 387
parenthesized, 330
postfix, 368
pre-decrement, 369
pre-increment, 369
primary, 327
reference equality operators, 388
relational operators, 384
remainder, 376
shift operators, 383
simple assignment operator, 393
string concatenation, 378
superclass access, 344
type comparison, 385
unary minus, 370
unary operators, 368
unary plus, 370
literals, 328
order
arguments left-to-right, 326
binary operators, 322
compound assignment, 323
left-hand operand first, 322
left-to-right, 322
operands evaluated before operations, 324
parentheses and precedence respected, 325
result of, term definition, 317
events
See also methods
execution order of, constraints on relationships among, 433
evolution
See also binary, compatibility; reuse
of classes, binary compatibility considerations, 257
of interface, binary compatibility considerations, 271
of packages, binary compatibility considerations, 257
examples
access control, 106
fields, methods, and constructors
default, 108
private, 111
protected, 110
public, 109
arrays, 212
classes, public and non-public, 107
declarations
fields, 162
import, 128
methods, 180
default-access methods, constructors, and fields, 108
exceptions, 224
fields
interface, ambiguous inherited, 204
interface, multiply inherited, 205
multiply inherited, 165
re-inheritance of, 166
hiding, 181
vs. overriding, 182
of variables
class, 162
instance, 163
inheritance
accessing members of inaccessible classes, 152
class members, 149
default access, 149
public, protected, and private access, 150
multiple, with superinterfaces, 146
with default access, 149
with private access, 151
with protected access, 150
with public access, 150
methods
abstract declarations, 207
invocation of hidden class, 184
private, 111
protected, 110
public, 109
overloading, 181
overriding, 180
vs. hiding, 182
incorrect, 181
because of throws, 186
large example, 185
exceptions
See also binary, compatibility; compile-time errors; errors;
(chapter), 219
asynchronous, causes and handling of, 224
caller, determination of, 222
causes of, 220
checked
constructors, declaring with throws clause in method declarations, 175
defining new exception classes as, 226
Exception, 226
in an instance initializer, 188
methods, declaring with throws clause in method declarations, 175
in a static initializer, 189
UnsatisfiedLinkException, 236
classes
Error, 221
Exception, 226
RuntimeException, 222
unchecked exceptions found in, 176
Throwable, 219, 221
errors
AbstractMethodError, 268
ClassCircularityError, 144, 258
meaning, 233
ClassFormatError, meaning, 233
Error, 226
ExceptionInInitializerError, 241, 304
IllegalAccessError, 258, 272, 358
meaning, 235
IncompatibleClassChangeError, 264, 269, 272, 357
meaning, 235
InstantiationError, meaning, 235
LinkageError, 233, 234
loading and linkage, 227
NoClassDefFoundError, 240
meaning, 233
NoSuchFieldError, 264
meaning, 236
NoSuchMethodError, 267, 273, 357
meaning, 236
OutOfMemoryError, 176, 233, 241, 242, 321, 334, 338, 340, 360
UnsatisifedLinkError
meaning, 236
VerifyError, 269, 272
meaning, 234
VirtualMachineError, 227
example, 224
handlers
compile-time checking, 221
how established, 219
in try statements, 306
handling of, 222
asynchronous, 224
run-time testing, 320
hierarchy, 226
integer divide by zero, 34
NegativeArraySizeException, 321, 338
never thrown for
assignment conversions, 66
information loss due to narrowing primitive conversions, 61
information loss sue to widening primitive conversions, 59
widening reference conversions, 63
NullPointerException, 194
parameters
See also variables
declaration, 306
description, 49
initial value, 51
scope, 86, 306
precise, 223
RuntimeException, 395
synchronization integrated with mechanism for handling, 220
thrown for, narrowing reference conversions, 63
uncaughtException method, when invoked, 220
unchecked, 226
unchecked runtime
ArithmeticException, 324, 376
ArrayIndexOutOfBoundsException, 394, 399
ArrayStoreException, 217, 320, 395, 398
ClassCastException, 320, 372, 395
casting conversion requirements that can result in, 75
IndexOutOfBoundsException, 212, 321, 364
NullPointerException, 213, 222, 321, 358, 361, 364, 366, 394, 399
RuntimeException, 226, 395
execution
See also declarations; evaluation; initialization; linking; loading
(chapter), 229
order, thread rules, 433
of statements for their effect, 275
exit
virtual machine, criteria for, 249
exponent
See value set
expressions
See also fields; methods; statements
(chapter), 317
abrupt completion of, as reason forabrupt statement completion, 277
additive operators
evaluation, 377
for numeric types, evaluation, 381
array
access, evaluation, 364
assignment, evaluation, 394, 399
creation, evaluation of, 337
assignment
conversion, 66
definite assignment, 407, 412
operators, evaluation, 392
as statements, 287
bitwise
binary operators, evaluation, 388
complement, evaluation, 371
boolean
operators
!, definite assignment, 414
&&, definite assignment, 413
?, definite assignment, 414
||, definite assignment, 413
assignment, definite assignment, 415
constant, definite assignment, 412
equality, evaluation, 388
logical, evaluation, 389
cast, evaluation, 372
compound, assignment operators, evaluation, 398
conditional
and operator &&, evaluation, 390
operator ? :
definite assignment, 414
evaluation, 391
or operator ||, evaluation, 390
definite assignment and, 412
division, evaluation, 374
equality operators, evaluation, 386
field access, evaluation, 341
instance creation
evaluation of, 330
as statements, 286
integer bitwise operators, evaluation, 389
logical
comparison operators, evaluation, 388
complement !, evaluation, 371
method invocation
evaluation, 345
evaluation order, 356
as statements, 287
multiplication *, evaluation, 373
multiplicative operators *, \xda , %, evaluation, 373
names
context in which a name is classified as, 95
qualified, meaning of, 102
simple, meaning of, 101
numeric
comparison, evaluation, 384
equality operators, evaluation, 387
operators
++, definite assignment, 416
--, definite assignment, 416
precedence, evaluation, 325
parenthesized
evaluation of, 330
evaluation of, precedence effect of, 325
post-decrement --
evaluation of, 368
as statements, 287
postfix, evaluation, 367
post-increment ++
evaluation of, 367
as statements, 287
pre-decrement --
evaluation of, 369
as statements, 287
pre-increment ++
evaluation of, 369
as statements, 287
primary, evaluation of, 327
See also
arrays, access expressions;
arrays, creation;
expressions, parenthesized;
fields, access expressions;
instance, creation;
literals;
methods, invocations;
this keyword
reference equality operators ==, !=, evaluation, 388
relational operators <, >, <=, >=, evaluation, 384
remainder operator %, evaluation, 376
run-time checks of, 319
semantics and evaluation rules, (chapter), 317
shift operators <<, >>, >>>, evaluation, 383
simple assignment operator =, evaluation, 393
statements
definite assignment, 417
specification, 284
string concatenation +, evaluation, 378
superclass access, evaluation, 344
type
vs. class of object, 52
comparison instanceof, evaluation, 385
how determined, 52
usage in, 46
unary
minus -, evaluation, 370
operators, evaluation, 368
plus +, evaluation, 370
values, variable as, 318
extends clause
See also classes; implements; object-oriented concepts
in class declaration, specifying direct superclasses with, 142
in interface declaration, 201

F

Feeley, Mark, 224
fields
access control
default, example, 108
private, example, 111
protected, example, 110
public, example, 109
access expressions, evaluation, 341
of an array, 92, 214
of a class
binary compatibility considerations, 262
declarations, 153
examples of, 162
final, 156
binary compatibility considerations, 264
volatile declaration not permitted for, 158
multiply inherited, example of, 165
non-static
default values, 51
explicit constructors not permitted to use, 193
hiding example, 163
initializers for, 159
initialization of, 158
invocation of initializers during instance creation, 242
specification, 48
re-inheritance of, example, 166
static
binary compatibility considerations, 266, 271
and final, binary compatibility considerations, 264
hiding of, example, 163
initialization of, 158, 189
initialization of, during the preparation phase of linking, 234
specification, 48
term definition and declaration, 155
transient, 156
binary compatibility considerations, 266
volatile, 156
declarations
binary compatibility considerations, 273
as declared entity, 81
hidden
accessing with
super keyword, 344, 345
this keyword, 283
of an interface
ambiguous inherited, example, 204
binary compatibility considerations, 273
declarations, 203
examples, 204
initialization, 204
during the preparation phase of linking, 234
multiply inherited example, 205
public by default, 203
names, naming conventions, 115
public, by default in interface declaration, 202
references to, binary file format requirements, 253
references, active use, 238
shadowing, 86
fifth dimension, 339
files
binary, format, 252
systems, storing packages in, 119
Finagle's Law, 219
final modifier
See also declarations; modifiers
anonymous class is always implicitly, 335
classes
binary compatibility considerations, 258
declaration of, 139
exception parameter, may not be assigned, 306
fields
binary compatibility considerations, 264
declaration and use, 156, 203
final by default in, interface declaration, 203
not allowed with volatile, 158
formal parameters, 168
methods
binary compatibility considerations, 268
declaration and use, 172
not permitted in interface method declarations, 206
reasons why constructors cannot be, 191
finalization
See also exceptions; linking
finalizable, as object attribute, 246
finalize method, as member of Object class, 45
finalized, as object attribute, 246
finalizer method calls, unordered nature of, 247
finalizer-reachable, as object attribute, 246
finally clause, exception handling use, 223
implementing, 246
of instances, 245
implementation procedures, 246
float type, 35
See also floating-point
floating-point
See also arithmetic; numbers; types
algebraic identities, limits on use of, 325
float type, floating-point literal specification, 24, 33
literals
largest and smallest, 24
term definition and specification, 24
operations, 37
required behavior, 38
types and values, term definition and specification, 35
flow analysis
See also security
conservative, required for definite assignment of local variables, 407
Foote, Samuel, 305
for statement
definite assignment, 422
ForInit part
initialization by, 295
scope of local variable declared in, 86
header, local variable declaration in, 281
in scope of a local variable, 86, 296
specification, 295
form feed
escape sequence, 29
Forman, Ira, 251
forward reference
compile-time error in
initializers, 160
forward references
to types allowed before declaration, 86
FP-strict
actual arguments, 169
and addition, 382
and casts, 372
classes, 139
classes, interfaces, methods, constructors and initializers, 319
compile-time constant is always, 406
constructors, 191
and division, 375
expression
term definition, 318
interfaces, 200
methods, 173
overriding, 178
and multiplication, 374
and return statement, 302
value set conversion within, 65
Franklin, Benjamin, 229
Frost, Robert, 199, 310, 315, 445

G

Gabriel, Richard P., 6
Geisel, Theodore, 132
Gilbert, W. S., 197
goal symbols
CompilationUnit, 123
syntactic grammar use, 10
Input, lexical grammar use, 9
Goldberg, Adele, 6
goto statement
See labeled statements
gradual underflow
See also exceptions; floating-point; IEEE 754 standard; numbers
support required for, 38
grammars
See also languages; lexical; semantics
(chapter), 9
context-free, term definition, 9
difficulties with, as given in body of Java Language Specification, 449
if statement, dangling else handling, 284
lexical
(chapter), 13
term definition, 9
notation, 10
syntactic, term definition, 10

H

Hammerstein, Oscar, II, 133
Harbison, Samuel, 6
Harding, Warren G., 307
hexadecimal
See also numbers
base, permitted in integer literals, 21
numerals, specification, 22
hiding
See also scope
by class methods, 178
of field declarations, in superclasses and superinterfaces, 154
of fields, 136
bypassing using super, 345
term definition, 154
hidden class methods, invocation of, example, 184
of interface field declarations, in superinterfaces, 203
of interface fields, term definition, 203
of interface member type declarations, 208
of interface member types, term definition, 208
of interfaces, 199
of member types, term definition, 187
method
example, 181
impact on checked exceptions, 176
requirements, 178
of methods, 136
vs. overriding, example, 182
of types, by member types, 136
of variables
class, example of, 162
instance, example of, 163
hierarchy
exception, 226
Higginson, Thomas Wentworth, 203
Hoare, C. A. R., 1, 6
horizontal tab
escape sequence, 29
host
and creation, storage and observability of packages and compilation units, 120
may not restrict packagesin a database, 130
and observable compilation units, 123
o