Contents | Prev | Next | Index

Index

Due to the semi-automated, complex technique of generating this extensive index, it has no hyperlinks in the first printing of this document. We plan to insert the index hyperlinks in a later printing. However, in the meantime, you can use the index by double-indirection. (1) Look up an entry here, get its page number, then (2) go to the Table of Contents and find the section that contains that page number, then you can click on that heading in the Table of Contents to jump directly to the section you want.

A

abrupt completion
See completion, abrupt
abs method
of class Math, 526
abstract modifier
See also declarations; modifiers
AbstractMethodError class, 611
classes
binary compatibility considerations, 242
declaration of, 131
definition and characteristics, 131
direct superinterface relationship to, 136
interfaces, implicit for every, 184
methods
binary compatibility considerations, 254
classes, 158
declaration examples, 158, 159, 190
interfaces, 189
overloading, 190, 191
overriding, 189, 190
semicolon as body of, 164
reasons why constructors cannot be declared as, 178
accept method
of interface FilenameFilter, 759
access
See also scope
accessibility
determining, 99
term definition, 99
accessible, term definition, 99
array, 195
expression evaluation order, 342
constructor, binary compatibility considerations, 248
of fields, expression evaluation, 319
inheritance of class members, example
default, 140
private, 141
protected, 141
public, 141
interface member names, 186
to members of a package, 120
method, binary compatibility considerations, 248
non-public class instances, through public superclasses and superinterfaces, 142
overridden methods, using super keyword, 165
qualified
See also field access expressions; method invocation expressions
term definition, 99
threads, volatile fields use for, 147
access control
See also security
classes, example, 100, 101
constructors
default, example, 102
private, example, 105
protected, example, 104
public, example, 103
fields
default, example, 102
private, example, 105
protected, example, 104
public, example, 103
IllegalAccessError class, 611
IllegalAccessException class, 611
methods
default, example, 102
private, example, 105
protected, example, 104
public, example, 103
package names, limited significance of, 115
protected, details of, 100
qualified names and, 99
standard exceptions, IllegalAccessException, 210
term definition, 99
acos method
of class Math, 519
actions
See also methods
main memory subsystem
lock, 401
read, 401
unlock, 401
write, 401
prescient store, with threads, 408
thread
assign, 401
load, 401
lock, 401
store, 401
unlock, 401
use, 401
threads, constraints on relationships among, 403
activeCount method
of class Thread, 599
of class ThreadGroup, 609
activeGroupCount method
of class ThreadGroup, 609
addElement method
of class Vector, 657
Addison, Joseph, 143
addObserver method
of class Observable, 643
after method
of class Date, 629
algebraic identities
See also expressions; mathematical functions
limits on use of, 308
allGroups methods
allGroupsCount method, of class ThreadGroup, 608
of class ThreadGroup, 608
allThreads method
of class ThreadGroup, 608
allThreadsCount method
of class ThreadGroup, 608
alphabet
See also syntax
components, see characters
data types, see primitive types
term definition, 7
ambiguity
See also names, ambiguous; scope
avoiding, in fields with multiple inheritance, 153
and method
of class BitSet, 621
append method
of class StringBuffer, 552
argument
See also parameters
IllegalArgumentException class, 611
lists, evaluation order, 309
values, method invocation conversion context, 66
arithmetic
See also floating-point; integers; Math class; numbers; operators; primitive types
ArithmeticException class, 611
integer division, ArithmeticException, 307
Math class, 517
Number class, 487
operators, numeric promotion, specification, 72
Random class, 646
standard exceptions, ArithmeticException, 209
arrays
See also classes; data structures
access, 195
expression evaluation order, 342
arraycopy method, of class System, 584
ArrayStoreException class, 611
assignment, expression evaluation order, 370
ByteArrayInputStream class, 689
ByteArrayOutputStream class, 727
(chapter), 193
character, distinguished from strings, 199
Class
objects, 199
obtaining, example, 49
Cloneable interface implemented by, 198
components
See also variables
assignment, run-time testing, 199, 303, 370, 375
default values, 46
initialization, 194
as a kind of variable, 44
type declaration, 194
creation, 195, 38
expression evaluation, 315
order, 316
order, example, 318
out-of-memory detection, example, 319
example, 196
grammar specification difficulties, 438
indexing of, 195
IndexOutOfBoundsException class, 611
initialization, 195, 196
LALR(1) grammar productions, 446
members, 197, 88
names, fully qualified, 106
NegativeArraySizeException class, 611
Object as superclass of, 199
origin, 195
standard exceptions
ArrayStoreException, 199, 209
IndexOutOfBoundsException, 209
NegativeArraySizeException, 209
variables
declaration, 194
initialization, 194
ASCII characters
See also characters; Unicode character set
Unicode character set relationship to, 11
asin method
of class Math, 519
assignment
See also fields; initialization
array, expression evaluation order, 370, 375
assignable to, term definition, 61
compatible, term definition, 61
compound
evaluation order, 305
operators, evaluation, 375
conversion context, specification, 52, 61
definite, (chapter), 383
expressions
boolean, definite assignment, 390
definite assignment, 391
as statements, 272
operation, to change value of primitive value, 31
simple operators, evaluation, 370
atan method
of class Math, 520
atan2 method
of class Math, 520
@author tag
specification, 421
available method
of class BufferedInputStream, 701
of class ByteArrayInputStream, 691
of class FileInputStream, 686
of class FilterInputStream, 697
of class InputStream, 682
of class LineNumberInputStream, 708
of class PushbackInputStream, 711
of class StringBufferInputStream, 693

B

backslash \
escape sequence, 27
Unicode escape use, 13
backspace
escape sequence, 27
banana-fana, 111
Bartleby
Project (Columbia University), ix
scrivener, 398
bases
See also numbers
permitted in integer literals, 19
bear, 236
before method
of class Date, 629
Bell, Alexander Graham, 119
Bernard de Morlay, 111
Beta, 3, 6
biblical quotations
I Corinthians 14:40, 305
John 3:30, 348
Matthew 6:29, 193
bibliographic references
The Art of Computer Programming, Volume 2, 650
Polling Efficiently on Stock Hardware, 206
Release-to-Release Binary Compatibility in SOM, 237
binary
compatibility
See also code generation; compile-time errors; exceptions
changes that do not break, 237
(chapter), 237
compatible with term definition, 240
contrasted with source compatibility, 241
properties and non-properties, 240
file format, required properties, 239
numeric promotion, specification, 74
representation, verification of classes and interfaces, 220

BitSet class, 618

BitSet class
blocks
See also control flow; statements
(chapter), 263
definite assignment, 393
LALR(1) grammar productions, 446
specification and execution of, 265
Bobrow, Daniel G., 6
body
See also declarations
class
declarations in, 138
term definition, 138
constructor, 178
binary compatibility considerations, 257
interface, declarations, 185
method, 164
binary compatibility considerations, 257
boolean
See also numbers
Boolean class, 469
booleanValue method, of class Boolean, 470
literals, term definition and specification, 23
operators, 36
type and values, term definition and specification, 36
Bovik, Harry, 126
Bowie, David, 509
Box, G. E. P., 650
brackets ([])
array type declaration, 194, 266, 37
syntactical ambiguities, handling of, 311
break statement
See also control flow
definite assignment, 397
as reason for abrupt completion, 264
specification, 283
brown paper packages, 126
buffers
buf field
of class BufferedInputStream, 699
of class BufferedOutputStream, 732
of class ByteArrayInputStream, 689
of class ByteArrayOutputStream, 727
buffer field, of class StringBufferInputStream, 692
BufferedInputStream class, 699
BufferedOutputStream class, 732
Bunyan, John, 823
Burke, Edmund, 263
Burton, Robert
exception, 213
lard, ix
but not phrase
grammar notation use, 10
Butler, Samuel, 530
butter, 530
Byron, Lord, 823
byte type
See also integral types; numbers; primitive types
ByteArrayInputStream class, 689
ByteArrayOutputStream class, 727
value range, 31

C

C, 1, 2, 6
C++, 1, 2, 6
Caesar, Julius, 352
caller
of a statement expression, term definition, 204
canRead method
of class File, 755
canWrite method
of class File, 756
capacity method
of class StringBuffer, 551
of class Vector, 658
capacityIncrement field
of class Vector, 655
carriage return (CR)
escape sequence, 27
handling in a
character literal, 24
string literal, 25
as a line terminator, not input character, 14
casting
See also conversion
boolean, 37
ClassCastException class, 611
conversion context, 53
specification, 67
floating-pointing types, 33
integral types, 33
reference types, 67
run-time testing, 303
standard exceptions, ClassCastException, 209
to void, not permitted, 272
catch clause, 290

catch clause
See also control flow; try statement
exception handling role of, 204
exception idiom defined with, 211
ceil method
of class Math, 524
Cervantes, Miguel de, 67
characters
See also Character class; numbers; primitive types; strings
array of, distinguished from strings, 199
char type, 30
See also integral types; numbers; primitive types
value range, 31
Character class, 471
charValue method, of class Character, 474
line terminators, 25
literals
escape sequences for, 26
term definition and specification, 24
Unicode character set
composite, contrasted with the Unicode decomposed characters, 18
handling in package names, 117
lexical grammar use as terminal symbols, 7
relationship to ASCII, 11
charAt method
of class String, 536
of class StringBuffer, 551
Chase, Lincoln, 111
Chaucer, Geoffrey
Canterbury Tales, 521
Troilus and Creseide, 528
checking
See also exceptions, checked; throw
checkAccept method, of class SecurityManager, 577
checkAccess method
of class SecurityManager, 572
of class Thread, 594
of class ThreadGroup, 605
checkConnect method, of class SecurityManager, 576
checkCreateClassLoader method, of class SecurityManager, 572
checkDelete method, of class SecurityManager, 576
checkError method, of class PrintStream, 739
checkExec method, of class SecurityManager, 573
checkExit method, of class SecurityManager, 573
checkLink method, of class SecurityManager, 574
checkListen method, of class SecurityManager, 577
checkPropertiesAccess method, of class SecurityManager, 574
checkPropertyAccess method, of class SecurityManager, 574
checkRead method, of class SecurityManager, 575
checkSetFactory method, of class SecurityManager, 577
checkTopLevelWindow method, of class SecurityManager, 578
checkWrite method, of class SecurityManager, 575
for exception handlers, at compile-time, 203
checkPackageAccess method
of class SecurityManager, 578
checkPackageDefinition method
of class SecurityManager, 578
Christie, Agatha
hand-writing experts, 325
no method, 465
Poirot's abrupt departure, 264
testing a statement, 273
Cicero, Marcus Tullius, 528
circular declaration
See also forward reference
ClassCircularityError class, 611
of interfaces, compile-time error caused by, 185
of subclasses, compile-time error caused by, 134
of types, in different compilation units, legality of, 118
class(es)
See also fields; inheritance; interfaces; methods; packages; subclasses; superclasses; superinterfaces
abstract, 131
as array component types, 194
binary compatibility considerations, 242
declaration of, 131
overriding abstract methods in, 158
uses, 132
accessibility, 99
binary compatibility considerations, 242
binary representation
binary file format requirements, 240
verification of, 220
body
declarations, binary compatibility considerations, 245
term definition and declarations in, 138
Class class, 466
class file format, binary file format use of, 238
Class objects, associated with arrays, 199, 49
.class suffix, as name for compiled files, 116
ClassCastException class, 611
ClassCircularityError class, 611
classDepth method, of class SecurityManager, 571
ClassFormatError class, 611
ClassLoader class, 558
classLoaderDepth method, of class SecurityManager, 572
ClassNotFoundException class, 611
constructors, binary compatibility considerations, 253
declarations, 128
(chapter), 127
LALR(1) grammar productions, 443
specifying direct superclasses in, 133
specifying direct superinterfaces in, 135
term definition, 128
as declared entity, 78
exception
Error, 203, 211
Exception, 203, 208
RuntimeException, 203, 208
Throwable, 201, 202, 208, 463
fields, see fields, class
final
binary compatibility considerations, 242
declaration of, 133
finalization of, 235
inaccessible, accessing members of, example, 142
IncompatibleClassChangeError class, 611
initialization, 223
detailed procedure, 225
example, 217
standard exceptions, ExceptionInitializerError, 212
instances, see instance(s)
instantiation, preventing, 180
linking
at virtual machine startup, 216
initialization, 212, 223, 225
preparation, 212, 221, 226
process description, 220
resolution, 216
loading, 218
at virtual machine startup, 216
process description, 29
standard errors
ClassCircularityError, 219
ClassFormatError, 219
NoClassDefFoundError, 219
members, 86
declarations, 138
binary compatibility considerations, 245
methods
class, 160
interface, 169
non-static, 160
static, 160
names
fully qualified, 105
scope of, 130
naming conventions, 108
NoClassDefFoundError class, 611
non-public, in example of qualified names and access control, 101
objects have, while variables have types, 47
as package members, 85
preparation, 221
at virtual machine startup, 216
standard exceptions, AbstractMethodError, 212
preventing instantiation of, 132
public
access control in, 99
binary compatibility considerations, 243
in example of qualified names and access control, 101
references to, binary file format requirements, 239
resolution
at virtual machine startup, 216
process description, 221
standard exceptions
IllegalAccessError, 221
IncompatibleClassChangeError, 221
InstantiationError, 222
NoSuchFieldError, 222
NoSucMethodError, 222
scope of, 81
standard, see standard classes
standard exceptions
ClassCastException, 209, 69
ClassNotFoundException, 210, 468, 559, 560
Error, 208
Exception, 208
RuntimeException, 208
Throwable, 208
static initializers, 175
binary compatibility considerations, 259
type declarations, as members of packages, 124
unloading of, 235
variables
default values, 46
specification, 145, 44
verification
at virtual machine startup, 216
standard exceptions, VerifyError, 212
classification
reclassification of contextually ambiguous names, 91
syntactic, of a name according to context, 90
clear method
of class BitSet, 620
of class Hashtable, 638
clearChanged method
of class Observable, 644
cloning
clone method
of class BitSet, 620
of class Hashtable, 636
of class Object, 460
of class Vector, 656
Cloneable interface, 465
CloneNotSupportedException class, 611
CLOS (Common Lisp Object System), 4
close method
of class FileInputStream, 686
of class FileOutputStream, 723
of class FilterInputStream, 697
of class FilterOutputStream, 731
of class InputStream, 682
of class OutputStream, 721
of class PipedInputStream, 688
of class PipedOutputStream, 726
of class PrintStream, 739
of class RandomAccessFile, 746
of class SequenceInputStream, 695
code generation
See also binary, compatibility; compile-time errors; exceptions; optimization
asynchronous exceptions, implications for, 205
initialization, implications for, 227
linking, implications for, 222
loading, implications for, 219
symbolic reference resolution implications of, 222
comments
commentChar method, of class StreamTokenizer, 716
documentation, (chapter), 419
term definition and specification, 15
Common Lisp, 4, 6
compareTo method
of class String, 538
compatibility
binary, see binary, compatibility
compilation
See also compile-time errors; exceptions; virtual machine
CompilationUnit goal symbol, syntactic grammar use, 8
conditional
binary compatibility considerations, 251
if statement reachability handling to support, 298
exception handlers checked for during, 203
unit
components, package declarations, 118
importing types into, 120
term definition and characteristics, 117
compile-time errors, 1
See also binary, compatibility; errors; exceptions completion, 264

completion
See also control flow; exceptions
abrupt
break statement, 283
continue statement, 285
during expression evaluation, 304
for statement, 282
labeled statements, 272
reasons for, 264, 304
return statement, 287
synchronized statement, 289
throw statement, 288
try statement, 290
try-catch statement, 292
try-catch-finally statement, 293
normal
during expression evaluation, 304
during statement execution, 264
component(s)
See arrays, components
type, arrays, 194
concat method
of class String, 544
concurrency, 309
See also synchronization; threads
conflicts
name
See also hiding; scope
avoiding through use of syntactic context, 89
connect method
of class PipedInputStream, 687
of class PipedOutputStream, 725
Conner, Michael, 237
constants
See also fields, class, final; fields, interface; literals
characteristics and binary compatibility considerations, 251
compile-time narrowing of
by assignment conversion, implications, 61
not permitted by method invocation conversion, 66
expressions, 381
in string literals, 26
field
binary compatibility considerations, 251
term specification, 251
named, see fields, class, final
primitive
binary compatibility considerations, 251
term definition, 251
constructors
See also class(es); execution; initialization; interfaces; methods
access, 99
binary compatibility considerations, 248
control
default, example, 102
private, example, 105
protected, example, 104
public, example, 103
hidden fields, this keyword use for, 269
body, 178
binary compatibility considerations, 257
as components of a class body, 138
declarations, 176
binary compatibility considerations, 253
LALR(1) grammar productions, 445
default, 180
deleting, binary compatibility considerations, 246
invocation, during instance creation, 228
as not members of a class, 86
modifiers, 177
names of, 176, 79
overloading, 180
binary compatibility considerations, 257
parameters, 177
See also arguments
assignment during instance creation, 228
binary compatibility considerations, 254
scope, 82
specification, 177, 45
private, preventing instantiation with, 132, 181
protected, accessibility of, 100
references to, binary file format requirements, 239
signature, 177
binary file format requirements, 240
throws clause, binary compatibility considerations, 256
contains method
of class Hashtable, 637
of class Vector, 659
containsKey method
of class Hashtable, 637
context(s)
See also inheritance; scope
conversion, 52
assignment, specification, 61
casting, specification, 67
method invocation, specification, 66
string, specification, 67
reclassification of contextually ambiguous names, 91
role in determining the meaning of a name, 79, 89
syntactic classification of a name according to, 90
context-free grammars
See grammars, context-free
continue statement
See also control flow
definite assignment, 397
as reason for abrupt completion, 264
specification, 285
contract
See also binary, compatibility
term definition, 241
control flow
See also completion; definite assignment; exceptions; expressions; statements; statements, unreachable; threads
boolean expressions use for, 37
break statement, specification, 283
continue statement, specification, 285
deadlock avoidance, multiple lock use for, 290
do statement, specification, 279
for statement, specification, 280
if statement, dangling else handling, 270
if-then statement, specification, 273
if-then-else statement, specification, 274
local variable declaration and switch statement, 45
return statement, specification, 286
switch statement, specification, 274
synchronized statement, specification, 289
throw statement, specification, 287
try statement, specification, 290
try-catch statement, specification, 291
try-catch-finally statement, specification, 293
while statement, specification, 277
conventions
naming, 106
impact on name hiding, 84
conversion
See also casting; numbers; promotion
casting, 67
categories and contexts, 52
(chapter), 51
contexts
assignment, specification, 61
casting, specification, 67
method invocation, specification, 66
string, specification, 67
forbidden, specification, 60
identity
in assignment conversion context, 61
in casting conversion context, 67
in method invocation conversion context, 66
specification, 54
kinds of, 54
in method invocations, 66
narrowing
primitive, 55
in assignment conversion context, 61
in casting conversion context, 67
not allowed in method invocation conversion context, reasons for, 66
reference, in casting conversion context, 67
reference
narrowing, 59
specification, 59
widening, 58
specification, 58
string, 67
specification, 60
term definition, 51
term specification, 58
widening
primitive, 54
in assignment conversion context, 61
in binary numeric promotion context, 74
in casting conversion context, 67
in method invocation conversion context, 66
in unary numeric promotion context, 73
reference, 58
in assignment conversion context, 61
in casting conversion context, 67
in method invocation conversion context, 66
term specification, 58
copyInto method
of class Vector, 659
cos method
of class Math, 519
count field
of class BufferedInputStream, 699
of class BufferedOutputStream, 732
of class ByteArrayInputStream, 689
of class ByteArrayOutputStream, 727
of class StringBufferInputStream, 692
countObservers method
of class Observable, 643
countStackFrames method
of class Thread, 598
countTokens method
of class StringTokenizer, 653 C++, 1, 2, 6

C++ Creamer, Henry, 595

Creamer, Henry
creation
See also declaration; initialization
array, 195, 38
expression evaluation
example, 318
order, 316
out-of-memory detection, example, 319
instance, 38
expression evaluation, 314
order, 315
expressions as statements, 272
invocation of initializers for instance variables during, 229
method dispatching during, 230
specification and procedure, 228
object, 38
threads, 415
Creatore, Luigi, 28
currentClassLoader method
of class SecurityManager, 571
currentThread method
of class Thread, 599
currentTimeMillis method
of class System, 581
cuspidor
See spittoon

D

Danforth, Scott, 237
dangling else
See also control flow
handling of, 270
data
See also constants; fields; variables
DataInput interface, 667
DataInputStream class, 703
DataOutput interface, 674
DataOutputStream class, 734
structures, see
arrays
classes
hash tables
interfaces
primitive types
vectors
types, see types
values, see values
database
storing packages in, 117
Date class, 622
Dave, 125
deadlock
avoidance, multiple lock use for, 290
decimal
See also numbers
base, permitted in integer literals, 19
numerals, specification, 20
declarations
See also body; execution; fields; initialization; methods; parameters; statements
class
body, 138
(chapter), 127
LALR(1) grammar productions, 443
member, 138
term definition and characteristics, 128
constructor, 176
example of, 177
LALR(1) grammar productions, 445
field(s), 143
constants in interfaces, 186
examples of, 151
grammar specification difficulties, 437
interface, examples, 188
LALR(1) grammar productions, 443
identifiers in, kept separate from those in labeled statements, 80
import
example, 123
single-type, 121
term definition, 120
type-import-on-demand, 122
interface, 184
body, 185
(chapter), 183
LALR(1) grammar productions, 445
members, 185
local variable, definite assignment, 393
method(s), 155
examples of, 168
grammar specification difficulties, 437
interface, abstract, 189
LALR(1) grammar productions, 444
modifiers, see
abstract modifier
final modifier
native modifier
private modifier
protected modifier
public modifier
static modifier
synchronized modifier
transient modifier
volatile modifier
overriding, example, 168
package, in compilation units, 118
subclass, 133
superclass, 133
superinterface, 135, 185
term definition, 78
type
as members of packages, 124
need not appear before use of the type, 82
usage in, 43
variable
array, 194
has a type, while objects have classes, 47
local, 265
execution of, 269
defaults field
of class Properties, 639
defineClass method
of class ClassLoader, 559
definite assignment
See also exceptions; execution; scope
(chapter), 383
delete method
of class File, 758
deleteObserver method
of class Observable, 643
deleteObservers method
of class Observable, 643
DeMichiel, Linda G., 6
denormalized
IEEE 754 standard, support required for, 34
term definition, 33
destroy method
of class Process, 562
of class ThreadGroup, 606
Dictionary class, 633
digits
digit method, of class Character, 485
Java, term definition, 17
division
See also arithmetic; numbers
integer divide by zero, indicated by ArithmeticException, 32, 352
do statement
See also control flow
definite assignment, 395
specification, 278
documentation
comments, (chapter), 419
Double class, 308, 510
double quote
escape sequence, 27
in string literals, 25
double type
See also Double class; Math class
floating-point literal specification, 22
doubleToLongBits method
of class Double, 515
doubleValue method
of class Double, 513
of class Float, 506
of class Integer, 490
of class Long, 497
of class Number, 487
Duff, Tom, 275
Duff's device, 275
dumpStack method
of class Thread, 600
Dylan, 4, 6

E

E field
of class Math, 518
Eco, Umberto, 111
Eisenhower, Dwight D., 364
element
elementAt method, of class Vector, 656
elementCount field, of class Vector, 655
elementData field, of class Vector, 655
elements method
of class Dictionary, 634
of class Hashtable, 637
of class Vector, 659
NoSuchElementException class, 664
type, arrays, term definition, 194
Ellis, Margaret A., 6
Elliston, Shirley, 111
empty method
of class Stack, 662
EmptyStackException class, 663
endsWith method
of class String, 540
ensureCapacity method
of class StringBuffer, 551
of class Vector, 658
entity
declared, list of, 78
enumerate method
of class Thread, 600
of class ThreadGroup, 609 Enumeration interface, 617

Enumeration interface
eolIsSignificant method
of class StreamTokenizer, 717
Epictetus, 186
equals method
of class BitSet, 619
of class Boolean, 470
of class Character, 473
of class Date, 626
of class Double, 511
of class File, 754
of class Float, 505
of class Integer, 489
of class Long, 496
of class Object, 459
of class String, 535
equalsIgnoreCase method
of class String, 537
errors
See also binary, compatibility; compile-time errors; exceptions
AbstractMethodError class, 611
ClassCircularityError class, 611
ClassFormatError class, 611
err field
of class FileNameDescriptor, 760
of class System, 580
Error class, 211, 611
unchecked exceptions as subclass of, 163
ExceptionInInitializerError class, 611, 614
IllegalAccessError class, 611
IncompatibleClassChangeError class, 611
InstantiationError class, 611
InternalError class, 611
linking, 211, 220
LinkageError class, 611
preparation, 221
resolution, 221
verification, 220
loading, 211, 219
NoClassDefFoundError class, 611
NoSuchFieldError class, 611
NoSuchMethodError class, 611
OutOfMemoryError class, 611
semantic, exceptions as mechanism for signaling, 201
standard, reasons for, 203
hierarchical relationships list, 611
types, run-time, 303
unchecked, reasons for, 203
UnknownError class, 611
UnsatisfiedLinkError class, 611
VerifyError class, 611
virtual machine, 212
escapes
sequences, for character and string literals, 26
Unicode, specification, 12
evaluation
See also execution; initialization; scope
evaluated, term definition, 301
expressions
additive operators, 355
additive operators for numeric types, 358
array access, 341
array assignment, 370
array creation, 315
assignment operators, 369
bitwise binary operators, 365
bitwise complement, 349
boolean equality operators, 364
boolean logical operators, 365
cast, 350
compound assignment operators, 375
conditional operator, 367
conditional-and operator, 366
conditional-or operator, 366
division, 352
equality operators, 362
field access, 319
instance creation, 314
integer bitwise operators, 365
logical binary operators, 365
logical complement, 349
method invocation, 323
method invocation, order of, 333
multiplication, 351
multiplicative operators, 351
numeric comparison, 361
numeric equality operators, 363
parenthesized, 313
postfix, 344
pre-decrement, 348
pre-increment, 347
primary, 311
reference equality operators, 364
relational operators, 360
remainder, 353
shift operators, 359
simple assignment operators, 369
string concatenation, 355
superclass access, 322
type comparison, 361
unary minus, 349
unary operators, 346
unary plus, 348
literals, 312
order
arguments left-to-right, 304
binary operators, 305
compound assignment, 305
left-hand operand first, 305
left-to-right, 309
operands before operators, 307
operands evaluated before operations, 307
parameters, 303
parentheses and precedence respected, 308
result of, term definition, 301
events
See also methods
execution order of, constraints on relationships among, 403
evolution
See also binary, compatibility; reuse
of classes, binary compatibility considerations, 242
of interfaces, binary compatibility considerations, 259
of packages, binary compatibility considerations, 242
examples
access control, 100
classes, 101
fields, methods, and constructors
default, 102
private, 105
protected, 104
public, 103
arrays, 196
classes, public and non-public, 101
declarations
fields, 151
import, 123
method, 168
default-access methods, constructors and fields, 102
exceptions, 206
fields
interface, ambiguous inherited, 188
interface, multiply inherited, 188
multiply inherited, 153
reinheritance of, 154
hiding, 168
of variables
class, 151
instance, 152
vs. overriding, 170
HTML generation from documentation comments, 423
inheritance
accessing members of inaccessible classes, 142
class members, 139
default access, 140
public, protected, and private access, 141
multiple, with superinterfaces, 137
with default access, 140
with private, 141
with protected, 141
with public, 141
methods
abstract declarations, 190
invocation of hidden class, 171
private, 105
protected, 104
public, 103
overloading, 168
overriding, 168
incorrect, 169
because of throws, 174
large example, 172
vs. hiding, 170
exceptions
See also binary, compatibility; compile-time errors; errors; Throwable class
ArithmeticException class, 611
ArrayStoreException class, 611
asynchronous, causes and handling of, 205
caller, determination of, 204
causes of, 202
(chapter), 201
checked
compile-time checking for handlers of, 203
constructors, declaring with throws clause in method declarations, 163
defining new exception classes as, 208
methods, declaring with throws clause in method declarations, 163
standard, 210
ClassCastException class, 611
classes
Error, 203, 211
Exception, 208
hierarchical relationships list, 611
RuntimeException, 203, 208
RuntimeException, unchecked exceptions found in, 164
Throwable, 201, 202
ClassNotFoundException class, 611
CloneNotSupportedException class, 611
EmptyStackException class, 663
example, 206
Exception class, 611
@exception tag, specification, 422
ExceptionInInitializerError class, 611, 614
handlers
compile-time checking, 203
how established, 201
in try statements, 291
handling of, 204
asynchronous, 205
run-time testing, 303
hierarchy, 208
IllegalAccessException class, 611
IllegalArgumentException class, 611
IllegalThreadStateException class, 611
IndexOutOfBoundsException class, 611
InstantiationException class, 611
integer divide by zero, 32
InterruptedException class, 611
NegativeArraySizeException class, 611
never thrown for
assignment conversions, 61
information loss due to narrowing primitive conversions, 57
information loss due to widening primitive conversions, 55
widening reference conversions, 59
NoSuchElementException class, 664
NoSuchMethodException class, 611
NullPointerException class, 611
NumberFormatException class, 611
parameters
See also variables
declaration, 290
description, 45
initial value, 46
scope, 291, 82
precise, 205
standard, 208
NegativeArraySizeException, 304, 316
RuntimeException, 371
standard (checked)
ClassNotFoundException, meaning, 210
CloneNotSupportedException, meaning, 210, 460
EOFException
declaration, 762
meaning, 210
Exception, 208
FileNotFoundException, 684, 722
declaration, 763
meaning, 210
IllegalAccessException, meaning, 210
InstantiationException, 131
meaning, 210
InterruptedException, 562, 598, 600, 601
meaning, 210
InterruptedIOException
declaration, 764
meaning, 210
IOException, 564, 565, 668, 669, 670, 671, 672, 675, 676, 677, 678, 680, 681, 682, 683, 685, 686, 687, 688, 694, 695, 696, 697, 698, 700, 701, 703, 704, 705, 706, 707, 708, 709, 710, 711, 717, 720, 721, 723, 724, 725, 726, 729, 730, 731, 733, 735, 736, 737, 744, 745, 746, 747, 748, 749, 750, 751
declaration, 761
meaning, 210
MalformedURLException, meaning, 211
ProtocolException, meaning, 211
SocketException, meaning, 211
UnknownHostException, meaning, 211
UnknownServiceException, meaning, 211
UnsatisfiedLinkException, 222
UTFDataFormatException
declaration, 765
meaning, 210
standard (errors)
AbstractMethodError, 254, 255
meaning, 212, 221
ClassCircularityError, 134, 243
meaning, 212, 219
ClassFormatError, 559
meaning, 212, 219
Error, 211
ExceptionInInitializerError, 227, 288
meaning, 212
IllegalAccessError, 243, 259, 336
meaning, 212, 221
IncompatibleClassChangeError, 251, 253, 256, 334, 336
meaning, 212, 221
InstantiationError, meaning, 212, 222
InternalError, meaning, 212
LinkageError, 219, 220
loading and linkage, 211
NoClassDefFoundError, 226
meaning, 212, 219
NoSuchFieldError, 250
meaning, 212, 222
NoSuchMethodError, 247, 253, 260, 334
meaning, 212, 222
OutOfMemoryError, 163, 213, 219, 227, 228, 304, 314, 315, 316, 319, 336
meaning, 212
StackOverflowError, meaning, 212
ThreadDeath, 595, 611
UnknownError, meaning, 212
UnsatisfiedLinkError, 583, 584, 611
meaning, 222
VerifyError, 255, 260
meaning, 212, 220
VirtualMachineError, 212, 611
standard (unchecked runtime)
ArithmeticException, 304, 307, 354
meaning, 209
ArrayStoreException, 199, 304, 371, 374, 584
meaning, 209
ClassCastException, 304, 351, 371, 69
casting conversion requirements that can result in, 69
ClassCastException, meaning, 209
EmptyStackException, 662
declaration, 663
meaning, 209
IllegalArgumentException, 597, 607, 625, 631, 744, 745
meaning, 209
IllegalMonitorStateException, 461, 462, 463
meaning, 209
IllegalThreadStateException, 562, 592, 593, 594, 597, 606
meaning, 209
IndexOutOfBoundsException, 195, 304, 342, 371, 376, 533, 534, 536, 543, 546, 551, 552, 553, 555, 556, 557, 559, 564, 565, 584, 655, 656, 657, 659, 660, 668, 675, 681, 685, 688, 690, 693, 695, 697, 701, 708, 711, 720, 723, 726, 731, 733, 735, 736, 737, 739, 746, 747, 749
meaning, 209
NegativeArraySizeException, 550
meaning, 209
NoSuchElementException, 617, 657
declaration, 664
meaning, 209
NullPointerException, 197, 204, 304, 335, 342, 343, 344, 371, 376, 507, 514, 533, 534, 536, 538, 539, 540, 541, 542, 543, 544, 546, 552, 553, 555, 559, 560, 565, 584, 595, 604, 633, 634, 668, 675, 677, 678, 680, 681, 685, 688, 690, 693, 695, 697, 701, 703, 708, 711, 720, 723, 726, 730, 731, 733, 735, 736, 737, 739, 740, 742, 746, 747, 749, 753, 754
meaning, 209
NumberFormatException, 489, 492, 493, 499, 500, 504, 511
meaning, 209
RuntimeException, 208, 371
SecurityException, 558, 563, 564, 565, 571, 572, 573, 574, 575, 576, 577, 578, 580, 581, 582, 583, 584, 592, 593, 595, 596, 597, 603, 604, 606, 607, 684, 685, 722, 723, 744, 745, 755, 756, 757, 758
meaning, 209
standard, 209
synchronization integrated with mechanism for handling, 202
Throwable class, 611
thrown for, narrowing reference conversions, 59
uncaughtException method, when invoked, 202
execution
See also declarations; evaluation; initialization; linking; loading
(chapter), 215
exec method, of class Runtime, 564
order, thread rules, 403
of statements for their effect, 263
exists method
of class File, 755
exit
exit method
of class Runtime, 563
of class System, 582
exitValue method, of class Process, 562
virtual machine, criteria for, 235
expressions
See also fields; methods; statements
abrupt completion of, as reason for abrupt statement completion, 265
additive operators
evaluation, 355
for numeric types, evaluation, 358
array
access, evaluation, 341
assignment, evaluation, 370, 375
creation, evaluation of, 315
assignment
conversion, 61
definite assignment, 391
operators, evaluation, 369
as statements, 272
bitwise
binary operators, evaluation, 365
complement, evaluation, 349
boolean
assignment, definite assignment, 390
constant, definite assignment, 386
operators
!, definite assignment, 387
!=, definite assignment, 389
&, definite assignment, 387
&&, definite assignment, 386
==, definite assignment, 389
? :, definite assignment, 389
^, definite assignment, 388
|, definite assignment, 388
||, definite assignment, 387
equality, evaluation, 364
logical, evaluation, 365
boolean-valued, definite assignment, 386
cast, evaluation, 350
(chapter), 301
compound, assignment operators, evaluation, 375
conditional
and operator &&, evaluation, 366
operator ? :
definite assignment, 390
evaluation, 367
or operator ||, evaluation, 367
definite assignment and, 386
division, evaluation, 352
equality operators, evaluation, 363
field access, evaluation of, 319
instance creation
evaluation of, 314
as statements, 272
integer bitwise operators, evaluation, 366
LALR(1) grammar productions, 450
logical
comparison operators, evaluation, 365
complement !, evaluation, 350
method invocation
evaluation, 323
evaluation order, 333
as statements, 272
multiplication *, evaluation, 351
multiplicative operators *, /, &, evaluation, 351
names
context in which a name is classified as, 91
qualified, meaning of, 96
simple, meaning of, 95
numeric
comparison, evaluation, 361
equality operators, evaluation, 363
operators
++, definite assignment, 392
--, definite assignment, 392
precedence, evaluation, 308
parenthesized
evaluation of, 313
evaluation of, precedence effect of, 308
post-decrement --
evaluation of, 345
as statements, 272
post-increment ++
evaluation of, 345
as statements, 272
postfix, evaluation, 344
pre-decrement --
evaluation of, 348
as statements, 272
pre-increment ++
evaluation of, 348
as statements, 272
primary, evaluation of, 311
See also arrays, access expressions; arrays, creation; fields, access expressions; instance, creation; literals; expressions, parenthesized; methods, invocations; this keyword
reference equality operators ==, !=, evaluation, 364
relational operators <, >, <=, >=, evaluation, 361
remainder %, evaluation, 353
run-time checks of, 302
semantics and evaluation rules, (chapter), 301
shift operators <<, >>, >>>, evaluation, 359
simple assignment operator =, evaluation, 370
statements
definite assignment, 394
specification, 272
string concatenation +, evaluation, 355
superclass access, evaluation, 322
type
comparison instanceof, evaluation, 362
how determined, 47
usage in, 43
vs. class of object, 47
unary
minus -, evaluation, 349
operators, evaluation, 346
plus +, evaluation, 349
values, variables as, 302
extends clause
See also classes; implements; object-oriented concepts
in class declaration, specifying direct superclasses with, 133
in interface declaration, 185

F

FALSE field
of class Boolean, 469
Feeley, Mark, 206
Fibonacci numbers, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610
fields
See also classes; constants; instances; interfaces; methods; variables
access control
default, example, 102
private, example, 105
protected, example, 104
public, example, 103
access expressions, evaluation, 319
of an array, 197
of a class
binary compatibility considerations, 249
declarations, 143
examples of, 151
final, 146
binary compatibility considerations, 250
volatile declaration not permitted for, 148
multiply inherited, example of, 153
non-static
default values, 46
explicit constructors not permitted to use, 179
hiding example, 152
initialization of, 149
initializers for, 150
invocation of initializers during instance creation, 229
specification, 44
reinheritance of, example, 154
static
and final, binary compatibility considerations, 251
binary compatibility considerations, 253, 259
hiding of, example, 151
initialization of, 149, 175
initialization of, during the preparation phase of linking, 221
specification, 44
term definition and declaration, 145
transient, 147
binary compatibility considerations, 253
volatile, 147
binary compatibility considerations, 253
final declaration not permitted for, 148
declarations
as declared entity, 78
binary compatibility considerations, 260
grammar specification difficulties, 437
LALR(1) grammar productions, 443
hidden
accessing using cast, 323
accessing with
super keyword, 322
this keyword, 269
of an interface
ambiguous inherited example, 188
binary compatibility considerations, 251
declarations, 186, 187
examples, 188
initialization, 187
during the preparation phase of linking, 221
multiply inherited example, 188
public by default, 187
length, as member of an array, 88
as members
of a class, 86
of an interface, 87
names, naming conventions, 109
NoSuchFieldError class, 611
public, by default in interface declaration, 187
references, active use, 224
scope of, 81
Fifth Dimension, 317
files
See also I/O; input; output; streams
binary, format, 238
File class, 752, 753
FileInputStream class, 684
FilenameFilter interface, 759
FileOutputStream class, 722
RandomAccessFile class, 743
standard
System.err, 580
System.in, 579
System.out, 580
standard exceptions
EOFException, 210, 762
FileNotFoundException, 210, 763
InterruptedIOException, 210, 764
IOException, 210, 261
systems, storing packages in, 115
fillInStackTrace method
of class ThreadGroup, 613
filters
FilterInputStream class, 696
FilterOutputStream class, 730
Finagle's Law, 201
final modifier
See also declarations; modifiers
classes
binary compatibility considerations, 242
declaration of, 133
fields
binary compatibility considerations, 250
declaration and use, 146, 186
final by default in, interface, declaration, 187
volatile declaration not permitted for, 148
methods
binary compatibility considerations, 255
declaration and use, 160
not permitted in interface method declarations, 189
reasons why constructors cannot be, 178
finalization
See also exceptions; linking
of classes, 235
finalizable, as object attribute, 232
finalize method
as member of Object class, 41
of class FileInputStream, 686
of class FileOutputStream, 724
of class Object, 463
finalized, as object attribute, 232
finalizer
method calls, unordered nature of, 234
finalizer-reachable, as object attribute, 232
finally clause, exception handling use, 204
implementing, 232
of instances, 231
implementation procedures, 232
unloading implications, 235
findSystemClass method
of class ClassLoader, 560
first cat, 126
firstElement method
of class Vector, 657
fish
relationship to pianos and stringed instruments, 137
Fitzgerald, F. Scott, 635
float type, 30
See also floating point
floating-point
See also arithmetic; numbers; types
algebraic identities, limits on use of, 308
Double class, 308, 510
Float class, 503
float type, floating-point literal specification, 22, 30
floatToIntBits method, of class Float, 508
floatValue method
of class Double, 512
of class Float, 505
of class Integer, 490
of class Long, 497
of class Number, 487
literals
largest and smallest, 22
term definition and specification, 22
Long class, 495
operations, 34
required behavior, 34, 35
types and values, term definition and specification, 33
floor method
of class Math, 524
flow analysis
See also security
conservative, required for definite assignment of local variables, 383
flush method
of class BufferedOutputStream, 733
of class DataOutputStream, 735
of class FilterOutputStream, 731
of class OutputStream, 721
of class PrintStream, 739
Foote, Samuel, 290
for statement
definite assignment, 396
ForInit part
initialization by, 281
scope of local variable declared in, 82
header, local variable declaration in, 266
specification, 280
forDigit method
of class Character, 486
form feed
escape sequence, 27
formal parameter
See parameters
Forman, Ira, 237
format
See also binary, compatibility
binary, properties of, 238
forName method
of class Class, 468
forward reference
See also scope
compile-time error in
class variable initialization, 149
instance variable initialization, 150
to types allowed before declaration, 82
Franklin, Benjamin, 215
freeMemory method
of class Runtime, 565
Frost, Robert
Generations of Men, 299
Line-gang, 415
Mending Wall, 183
Mountain, 295
Fuller, Thomas, 823

G

Gabriel, Richard P., 6, 92
Gauss, Carl Friedrich, 42, 196, 650
gc method
See also memory
of class Runtime, 566
of class System, 583
Geisel, Theodore, 125
generation
code, see code generation
get
get method
of class BitSet, 620
of class Dictionary, 633
of class Hashtable, 637
getAbsolutePath method, of class File, 755
getBoolean method, of class Boolean, 470
getBytes method, of class String, 536
getChars method
of class String, 536
of class StringBuffer, 552
getClass method, of class Object, 458
getClassContext method, of class SecurityManager, 571
getClassLoader method, of class Class, 468
getDate method, of class Date, 627
getDay method, of class Date, 627
getErrorStream method, of class Process, 561
getException method, of class ExceptionInInitializerError, 614
getFD method
of class FileInputStream, 685
of class FileOutputStream, 723
of class RandomAccessFile, 745
getFilePointer method, of class RandomAccessFile, 745
getHours method, of class Date, 628
getInCheck method, of class SecurityManager, 572
getInputStream method, of class Process, 561
getInteger method, of class Integer, 493
getInterfaces method, of class Class, 467
getLineNumber method, of class LineNumberInputStream, 709
getLocalizedInputStream method, of class Runtime, 567
getLocalizedOutputStream method, of class Runtime, 568
getLong method, of class Long, 501
getMaxPriority method, of class ThreadGroup, 607
getMessage method, of class ThreadGroup, 612
getMinutes method, of class Date, 628
getMonth method, of class Date, 627
getName method
of class Class, 466
of class File, 755
of class Thread, 596
of class ThreadGroup, 605
getOutputStream method, of class Process, 561
getParent method
of class File, 755
of class ThreadGroup, 605
getPath method, of class File, 755
getPriority method, of class Thread, 597
getProperties method, of class System, 581
getProperty method
of class File, 753
of class Properties, 640
of class System, 582
getRuntime method, of class Runtime, 563
getSeconds method, of class Date, 628
getSecurityManager method, of class System, 580
getSuperclass method, of class Class, 467
getThreadGroup method, of class Thread, 597
getTime method, of class Date, 629
getTimezoneOffset method, of class Date, 630
getYear method, of class Date, 626
Gilbert, W. S., 181
goal symbols
CompilationUnit, 117
syntactic grammar use, 8
Input, lexical grammar use, 7
good fences, 183
goto statement
See labeled statements
gradual underflow
See also exceptions; floating-point; IEEE 754 standard; numbers
support required for, 34
grammars
See also languages; lexical; semantics
(chapter), 7
context-free, term definition, 7
difficulties with, as given in body of Java Language Specification, 433
if statement, dangling else handling, 270
LALR(1), (chapter), 433
lexical
(chapter), 11
term definition, 7
modifier specification difficulties, 435
name specification difficulties, 433
notation, 8
one-token lookahead, primary expression evaluation implications, 311
syntactic, 8
LALR(1) grammar, 440
term definition, 8
groups method
of class ThreadGroup, 608
groupsCount method
of class ThreadGroup, 608

H

Hammerstein, Oscar, II, 126
Harbison, Samuel, 6, 543
Harding, Warren G., 291
Hardy, Godfrey Harold, 224
hasChanged method
of class Observable, 644
hashtables
See also data, structures
clear method, of class Hashtable, 638
clone method, of class Hashtable, 636
contains method, of class Hashtable, 637
containsKey method, of class Hashtable, 637
elements method, of class Hashtable, 637
get method, of class Hashtable, 637
hashCode method, 41
of class BitSet, 619
of class Boolean, 470
of class Character, 474
of class Date, 626
of class Double, 512
of class File, 754
of class Float, 505
of class Integer, 489
of class Long, 496
of class Object, 459
of class String, 535
Hashtable class, 635
isEmpty method, of class Hashtable, 636
keys method, of class Hashtable, 637
put method, of class Hashtable, 637
rehash method, of class Hashtable, 637
remove method, of class Hashtable, 637
size method, of class Hashtable, 636
toString method, class Hashtableof, 636
hasMoreElements method
of class StringTokenizer, 653
of interface Enumeration, 617
hasMoreTokens method
of class StringTokenizer, 652
haveNextNextGaussian field
of class Random, 647
hexadecimal
See also numbers
base, permitted in integer literals, 19
numerals, specification, 20
hiding
See also scope
absence of by statement labels, 272
by class methods, 165
of field declarations, in superclasses and superinterfaces, 144
hidden class methods, invocation of, example, 171
method
example, 168
impact on checked exceptions, 164
requirements, 166
names, 83
by local variables, 269
package, 120
vs. overriding, example, 170
term definition, 144
of variables
class, example of, 151
instance, example of, 152
hierarchy
exception, 208
Higginson, Thomas Wentworth, 186
Hoare, C. A. R., 1, 419, 6
horizontal tab
escape sequence, 27
hosts
environment inquiries, see Runtime class
package support by, 115
standard exceptions, UnknownHostException, 211
HTML (Hypertext Markup Language)
generation through documentation comments
(chapter), 419
example, 423
Hyman, Rob, 610

I

I/O
See also files
java.io package, (chapter)
standard exceptions
EOFException, 210
InterruptedIOException, 210
IOException, 210
identifiers
See also fields; names; scope; variables
characteristics of those that are not names, 79
in labeled statements, distinguished from those in declarations, 80
term definition and specification, 17
as token, 17
identity
conversion
in assignment conversion context, 61
in casting conversion context, 67
in method invocation conversion context, 66
specification, 54
IEEE 754 standard, 6

IEEE 754 standard
See also numbers
compliance, narrowing conversion from double to float, 57
floating-point
conversion of numbers to, 22
types conformance to, 33
IEEEremainder method
of class Math, 524
if statements
See also statements
dangling else, handling of, 270
definite assignment, 394
if-then statement, specification, 273
if-then-else statement, specification, 274
specification, 273
IllegalAccessError class, 611
IllegalAccessException class, 611
IllegalArgumentException class, 611
IllegalThreadStateException class, 611
implement
See also classes; extends clause; interfaces
implements clause, 185
class declaration, specifying direct superinterfaces with, 135
term definition, 135, 87
import
See also packages; scope
automatic, 122
declarations
example, 123
single-type, 121
term definition, 120
type-import-on-demand, 122
imported types
as declared entity, 78
scope of, 81
in field
of class FileNameDescriptor, 760
of class FilterInputStream, 696
of class System, 579
inCheck field
of class SecurityManager, 570
inClass method
of class SecurityManager, 571
inClassLoader method
of class SecurityManager, 572
IncompatibleClassChangeError class, 611
index entries
bogus
Fibonacci numbers, 783
prime numbers, 801
warp factors, 820
obscure
Bell, Alexander Graham, 769
Bovik, Harry, 770
Fifth Dimension, 784
first cat, 784
Gauss, Carl Friedrich, 785
Hardy, Godfrey Harold, 786
make it so, 793
Marx, Chico, 794
Marx, Groucho, 794
panjandrum, 800
Ramanujan, Srinivasa, 803
razor, 803
Saturday Night Live, 805
Tokens, The, 817
virtue, 820
warp factors, 820
self-referential
index entries, 788
not, see Russell's paradox
self-reference, 805
Star Trek, 808
silly
banana-fana, 769
bear, 769
brown paper packages, 770
butter, 770
cuspidor, 776
good fences, 786
mighty minds, 796
mystic evolution, 796
one too many, 798
spittoon, 807
sweat, 810
indexing
of arrays, 195
indexOf method
of class String, 540
of class Vector, 659
IndexOutOfBoundsException class, 611
inexact results
See also numbers
rounding behavior, 35
infinity
See also number
isInfinite method
in class Double, 23
in class Float, 23
Java representation of, 23
NEGATIVE_INFINITY field
in class Double, 23
in class Float, 23
POSTIVE_INFINITY field
in class Double, 23
in class Float, 23
signed, produced by floating-point overflow, 35
inheritance
See also object-oriented concepts; scope
in class
examples of, 139
of members, 138
of members, with public, protected, and private access, examples, 141
private, example, 141
protected, example, 141
public, example, 141
with default access, example, 140
of fields
in class declarations
multiply inherited from interfaces, example of, 153
reinheritance of, example of, 154
in interface declarations
ambiguous inherited, example, 188
multiply inherited, example, 188
of members, 85
in interface declarations, 186
of methods
in class declarations, 165
with the same signatures, 166
in interface declarations, 189
multiple
See also superinterfaces
example, 137
term definition, 85
initialization
See also control flow; linking
of arrays
in creation, to default value, 317, 46
using array initializers, 196
of classes, 223
detailed procedure, 225
detailed procedure, 225
of fields
in classes, 149
in interfaces, 187
of for statement, 281
of interfaces, 223
detailed procedure, 225
standard exceptions, ExceptionInitializerError, 212
of types, when it occurs, 223
for variables, array, 194
initializers
See also creation; execution
arrays, 196
ExceptionInInitializerError class, 611, 614
executing, in Test class example initialization, 217
for fields
in class, 149
in interface, 187
static, 149, 175
binary compatibility considerations, 259
LALR(1) grammar productions, 444
for variables
class, 149
during class or interface initialization, 149
instance, 150
during instance creation, 229
input
See also files; output; streams
BufferedInputStream class, 699
ByteArrayInputStream class, 689
elements, term definition, 14
FileInputStream class, 684
FilterInputStream class, 696
Input goal symbol, lexical grammar use, 7
InputStream class, 680
LineNumberInputStream class, 707
PipedInputStream class, 687
PushbackInputStream class, 710
SequenceInputStream class, 694
StringBufferInputStream class, 692
tokens, 14
insert method
of class StringBuffer, 555
insertElementAt method
of class Vector, 657
instance(s)
See also classes; interfaces; object-oriented concepts
creation, 228, 38
constructor
invocation by creation expressions, 177
parameter assignment during, 228
use in, 176
expression evaluation, 314
order, 315
expressions as statements, 272
invocation of initializers for instance variables during, 229
method dispatching during, 230
finalization of, 231
implementation procedures, 232
instanceof operator
testing expression types with, 303
testing expressions with, 303
instantiation
InstantiationError class, 611
InstantiationException class, 611
preventing, with private constructors, 132, 180
methods, see methods, non-static
standard exceptions, InstantiationException, 131, 210
variables, see fields, class, non-static
instanceof operator
testing expression types with, 303
integers
See also arithmetic; integral types; numbers
converting to boolean values, 37
intBitsToFloat method, of class Float, 508
Integer class, 488
intValue method
of class Double, 512
of class Float, 505
of class Integer, 489
of class Long, 496
of class Number, 487
literals
longest permitted, 21
term definition and specification, 19
operations, 31
integral types
See also arithmetic; 31numbers; 31types; 31
byte type, 30
value range, 31
char type, 30
value range, 31
int type, 30
value range, 31
long type, 30
value range, 31
short type, 30
value range, 31
values and operations, 31
interfaces
See also class(es); fields; methods; packages; subclasses; superclasses; superinterfaces
abstract methods, 190, 191
accessibility, 99
as array element types, 194
binary compatibility considerations, 259
binary representation
binary file format requirements, 240
verification of, 220
body, declarations, 185
Cloneable, implemented by arrays, 198
declarations, 184
(chapter), 183
LALR(1) grammar productions, 445
as members of packages, 85
as declared entity, 78
fields
binary compatibility considerations, 251
declarations, 186
examples, 188
inheritance
ambiguous, 188
multiply, 188
initialization, 187
initialization, 223
detailed procedure, 225
linking, process description, 220
loading, 218
process description, 219
members, 87
binary compatibility considerations, 260
declarations, 185
inheritance from superinterfaces, 186
names, access to, 186
methods
declarations, examples, 190
overloading, 190
examples, 191
overriding, 189
examples, 190
names
fully qualified, 105
naming conventions, 108
as package members, 85
preparation of, 221
process description, 219
public
binary compatibility considerations, 259
declaration, 184
references to, binary file format requirements, 239
scope of, 184, 81
standard, Cloneable, implemented by arrays, 198
superinterfaces
binary compatibility considerations, 243
of a class, 135
declaration of, 135
unloading of, 235
intern method
of class String, 547
InternalError class, 611
internationalization
See Unicode character set
interrupt method
of class Thread, 599
interrupted method
of class Thread, 599
InterruptedException class, 611
invocation
of constructors
expression evaluation, 314
expression evaluation, order, 315
in creation of new class instances, 228
language constructs that result in, 177
of hidden class methods, example, 171
of methods
conversion, 66
expression evaluation, 323
order, 333
how chosen, 303
isAbsolute method
of class File, 755
isAlive method
of class Thread, 598
isDaemon method
of class Thread, 597
of class ThreadGroup, 607
isDefined method
of class Character, 474
isDigit method
of class Character, 478
isDirectory method
of class File, 756
isEmpty method
of class Dictionary, 633
of class Hashtable, 636
of class Vector, 658
isFile method
of class File, 756
isInfinite method
of class Double, 515
of class Float, 508
isInterface method
of class Class, 467
isInterrupted method
of class Thread, 599
isJavaLetter method
of class Character, 482
isJavaLetterOrDigit method
of class Character, 482
isLetter method
of class Character, 479
isLetterOrDigit method
of class Character, 480
isLowerCase method
of class Character, 476
isNaN method
of class Double, 514
of class Float, 507
isSpace method
of class Character, 482
isTitleCase method
of class Character, 478
isUpperCase method
of class Character, 477
iteration
See also control structures
continue statement, use with, 285
do statement, specification, 279
for statement, specification, 281
while statement, specification, 277

J

Java
See also grammars; languages; lexical; semantics; syntax
digits, term definition, 17
java.io package
classes, methods, and fields (chapter), 665
exceptions, 210
java.lang package
classes, methods, and fields (chapter), 455
exceptions, 209
public type names automatically imported from, 122
public types defined in, list of, 123
java.net package, exceptions, 211
.java suffix, as name for source files, 116
java.util package, classes, methods, and fields (chapter), 615
JDK (Java Developer's Kit), package organization, 117
letters, term definition, 17
Virtual Machine, see virtual machine
Johnson, Samuel
harmless drudge, 11
round numbers, 525
join method
of class Thread, 598
Jon L White, 544

K

Keats, John
Eve of St. Agnes, 200
Lamia, 638
Keene, Sonya E., 6
Kelvin, Lord (William Thompson), 301
Kernighan, Brian W., 6
keys method
of class Dictionary, 634
of class Hashtable, 637
keywords
list of, 18
as token, 7
Kiczales, Gregor, 6
Knuth, Donald E., 420, 648, 650

L

labeled statements
identifiers in, kept separate from those in declarations, 80
specification, 271
LALR(1) (Look Ahead Left Right with 1 token lookahead) grammar
(chapter), 433
language
See also grammars; Java; lexical; semantics; syntax
Beta, 3, 6
C, 1, 2, 6
C++, 1, 2, 6
CLOS, 4
Common Lisp, 4, 6
Dylan, 4, 6
Mesa, 5, 6
Modula-3, 3, 6
term definition, 7
Lao-Tsu, 77
lastElement method
of class Vector, 657
lastIndexOf method
of class String, 542
of class Vector, 660
lastModified method
of class File, 757
Lauper, Cyndi, 610
Layton, Turner, 595
left-hand side
term definition, 7
Lehmer, D. H., 648
length
of array, 197
not part of type, 194
length field, as member of an array, 88
length method
of class File, 757
of class RandomAccessFile, 746
of class String, 535
of class StringBuffer, 550
letters
See also Unicode character set
Java, term definition, 17
lexical
See also semantics; syntax
grammar
LALR(1) grammar, 440
term definition, 7
structure, (chapter), 11
translations, steps involved in, 12
life cycle
See also objects
of objects, 233
line terminators, term definition, 13
linefeed (LF)
escape sequence, 27
handling in a
character literal, 24
string literal, 25
as a line terminator, not input character, 25
lineno method
of class StreamTokenizer, 719
LineNumberInputStream class, 707 linking, 220

linking
See also exceptions; execution; initialization; loading; run-time
classes, process description, 220
errors, 211
in Test class example, at virtual machine startup, 216
interfaces, process description, 220
linkage editing, as optimization technique, 222
LinkageError class, 611
UnsatisfiedLinkError class, 611
list method
of class File, 757
of class Properties, 642
of class ThreadGroup, 609
Litchfield, I. W., 517
literals
See also constants; fields; variables
boolean, term definition and specification, 23
character
escape sequences for, 26
term definition and specification, 24
evaluation of, 312
floating-point
largest and smallest permitted, 22
term definition and specification, 22
integer
largest and smallest permitted, 21
term definition and specification, 19
null, term definition and specification, 27
string
escape sequences for, 26
term definition and specification, 25
term definition and specification, 19
as token, 7
loading
See also ClassLoader class; execution; linking
classes, 218
ClassLoader class, 558
errors, 211
in Test class example, at virtual machine startup, 216
interfaces, 218
load method
of class Properties, 640
of class Runtime, 567
of class System, 583
loadClass method, of class ClassLoader, 559
loadLibrary method
of class Runtime, 567
of class System, 584
process, 219
local variables
See also scope; variables
declarations
definite assignment, 393
statements, 265
declarators and types, 266
definite assignment, required for, 383
hiding of names by, 268
initial value, 46
naming conventions, 110
scope, 267, 82
specification, 45
locks
See also monitors; synchronization; threads
acquisition and release
by synchronized networks, 161
by synchronized statement, 289
(chapter), 399
interaction with variables, rules about, 407
rules about, 406
synchronization and, 415
log method
of class Math, 521
Long class, 495
long type, 30
See also integral types; numbers
integer literal specification, 20
value range, 31
longBitsToDouble method
of class Double, 515
longValue method
of class Double, 512
of class Float, 505
of class Integer, 489
of class Long, 497
of class Number, 487
Lowell, James Russell, 417
lowerCaseMode method
of class StreamTokenizer, 717
lvalue
See variables, as value of expression

M

Madsen, Ole Lehrmann, 6
magnitude
loss of information about, possibility of in narrowing primitive conversion, 55
make it so, 369
mark method
of class BufferedInputStream, 701
of class FilterInputStream, 697
of class InputStream, 682
of class LineNumberInputStream, 709
marklimit field
of class BufferedInputStream, 700
markpos field
of class BufferedInputStream, 700
markSupported method
of class BufferedInputStream, 702
of class FilterInputStream, 698
of class InputStream, 683
of class PushbackInputStream, 711
Marsaglia, G., 650
Marx, Chico
A Night at the Opera
commutative diagram, 397
nested operations, 388
Marx, Groucho
club membership, 138
never forgets a face, 214
A Night at the Opera
car, 386
cdr, 393
iteration, 388
recursion, 390
Math class, 517
mathematical functions
See also arithmetic; numbers
Math class, 517
max method
of class Math, 529
MAX_PRIORITY field
of class Thread, 591
MAX_RADIX field
of class Character, 473
MAX_VALUE field
of class Character, 473
of class Double, 214, 364, 510, 7, 748
of class Float, 38, 503
of class Integer, 488
of class Long, 495
Maybury, William, 6
Melville, Herman, 398
members
See also class(es); fields; interfaces; methods
accessibility of, 99
arrays, 197, 88
classes, 138, 86
binary compatibility considerations, 245
declarations, 138
inaccessible, accessing, example, 142
inheritance, examples, 139, 140
private, inheritance examples, 141
inheritance and, 85
interfaces, 186, 87
binary compatibility considerations, 260
declarations, 185
inheritance, 186
names, access to, 186
Object class, 41
packages, 114, 85
access to, 120
protected, accessibility of, 100
reference type
as declared entity, 78
scope of, 81
of superclasses, accessing with super, 322
term definition, 85
memory
gc method, 583
main, term definition, 401
master, of variables, term definition, 401
OutOfMemoryError class, 611
standard exceptions
OutOfMemoryError, 163, 212, 213, 227, 228
OutOfMemoryError, meaning, 219
term definition, 401
working, term definition, 401
Mesa, 5, 6 method(s), 155

method(s)
See also class(es); constructors; control flow; fields; initialization; interfaces
abstract
binary compatibility considerations, 254
in classes, 158
in interfaces, 189, 190
overloading, 191
access, binary compatibility considerations, 248
access control
default, example, 102
private, example, 105
protected, example, 104
public, example, 103
of array, 197
body, 164
binary compatibility considerations, 257
class, see methods, static
classes, 160
abstract, 158
binary compatibility considerations, 253
body
declarations, 164
with no executable code, 164
constructors compared with, 176
declarations, 155
declarations, examples of, 168
final, 160
hidden, invocation of, 171
hiding by, 165
modifiers, 157
native
declaration, 161
semicolon as body of, 164
newInstance, constructor invocation by, 177
private, as implicitly final, 160
signature, 157
synchronized, declaration, 161
void, expression return statement not permitted in, 164
with same signature, inheriting, 166
declarations, 155, 189
binary compatibility considerations, 253
grammar specification difficulties, 437
LALR(1) grammar productions, 444
as declared entity, 78
deleting, binary compatibility considerations, 247
dispatching during instance creation, 230
equals, 41
as member of Object class, 41
final, 160
binary compatibility considerations, 255
finalize, as member of Object class, 41
getClass, 41
as member of Object class, 41
hashCode, 41
as member of Object class, 41
hiding of, 165
inheritance
in arrays, 197
in classes, 165
in interfaces, 186
instance, see method(s), non-static; 209
of interfaces
declarations, 189, 190
overloading, 190, 191
overriding, 189, 190
semicolon as body of, 164
invalid arguments to, standard exceptions, IllegalArgumentException, 209
invocation
See also access control
conversion, 66
expression evaluation, 323
order, 333
expressions as statements, 272
how chosen, 303
as members
of a class, 86
of an interface, 87
method table creation during preparation phase of linking, 221
names
context in which a name is classified as, 91
naming conventions, 108
qualified, meaning of, 98
simple, meaning of, 98
native, 161
binary compatibility considerations, 256
newInstance, creating an instance with, 228
non-static
instance method as name for, 160
overriding by, 165
NoSuchMethodError class, 611
NoSuchMethodException class, 611
notify, as member of Object class, 41
notifyAll, as member of Object class, 41
overloading, 167
binary compatibility considerations, 257
examples, 168
overriding, 165
binary compatibility considerations, 258
examples, 168, 169, 170, 172, 190
parameters
See also arguments; variables
binary compatibility considerations, 254
description, 45
initial value, 46
specification of, 156
private, in example of qualified names and access control, 105
public, interfaces, declarations, 189
references to, binary file format requirements, 239
result type, binary compatibility considerations, 254
scope of, 81
signatures, 157
binary file format requirements, 239
static, binary compatibility considerations, 256
stop, as asynchronous exception cause, 206
synchronized, 161
binary compatibility considerations, 256
throws clause, binary compatibility considerations, 256
toString, as member of Object class, 41
uncaughtException
exception handling use, 205
when invoked, 202
wait, as member of Object class, 41
Michael de Montaigne, 155
mighty minds, 350
Mill, John Stuart
On Liberty
comments, 308
parentheses, 308
min method
of class Math, 528
MIN_PRIORITY field
of class Thread, 591
MIN_RADIX field
of class Character, 473
MIN_VALUE field
of class Character, 473
of class Double, 510
of class Float, 503
of class Integer, 488
of class Long, 495
Mitchell, James G., 6
mkdir method
of class File, 757
mkdirs method
of class File, 757
modifiers
See also declarations
class, 130
constructor, 177
declaration, see
abstract modifier
final modifier
native modifier
private modifier
protected modifier
public modifier
static modifier
synchronized modifier
transient modifier
volatile modifier
field, 144
grammar specification difficulties, 435
interface, 184
method, 157
Modula-3, 3, 6
Molière, 7
Møller-Pedersen, Birger, 6
monitors
See also locks; synchronization
term definition, 399
Moon, David A., 6
Muller, M. E., 650
music
variations on a theme, 137
mystic evolution, 261

N

name game, 111
names
See also identifiers; scope; Unicode character set
ambiguous
handling of, 89, 91
reclassification of, 91
(chapter), 77
class
naming conventions, 108
scope of, 130
conflicts
See also hiding
avoiding
in fields with multiple inheritance, 153
through context use, 89
through naming conventions, 106
constants, naming conventions, 109
conventions, 106
impact on name hiding, 84
expression
context in which a name is classified as, 91
qualified, meaning of, 96
simple, meaning of, 95
fields, naming conventions, 109
grammar specification difficulties, 433
hiding, 83
interface
member, access to, 186
naming conventions, 108
LALR(1) grammar, 441
meaning of, determining, 89
method, 156
context in which a name is classified as, 91
naming conventions, 108
qualified, meaning of, 98
simple, meaning of, 98
package
context in which a name is classified as, 90
hiding, 120
in compilation units, 118
limited significance for access control, 115
naming conventions, 107
qualified, meaning of, 93
scope of, 120
simple, meaning of, 93
unique, 125
importance of, 125
parameters, naming conventions, 110
qualified
access control and, 99
fully, 105
term definition, 79
resolving references to, during resolution phase of linking, 221
restrictions, types and subpackages, 114
rules on being the same
class members, 86
fields, 86
interface fields, 87
methods, 87
simple
scope of, 81
term definition, 79
as subset of identifiers, 79
syntactic
categories, 89
classification of according to context, 90
term definition, 79
type
context in which a name is classified as, 90
interface, scope of, 184
qualified, meaning of, 94
simple, meaning of, 93
variables, local, naming conventions, 110
NaN (Not-a-Number)
See also numbers
comparison results, 35
double, conversion to a float NaN, in narrowing conversion, 57
NaN field
of class Double, 511
of class Float, 504
predefined constants representing, 23
preventing use of algebraic identities in expression evaluation, 308
term definition and specification, 33
narrowing
See also conversion; numbers
primitive conversions
in assignment conversion context, 61
in casting conversion context, 67
not allowed in method invocation conversion context, reasons for, 66
specification, 55
reference conversions, specification, 59
native modifier
See also declarations; modifiers
methods
binary compatibility considerations, 256
declaration, 161
semicolon as body of, 164
not permitted in interface method declarations, 189
reasons why constructors cannot be, 178
NEGATIVE_INFINITY field
of class Double, 511
of class Float, 504
NegativeArraySizeException class, 611
network
standard exceptions
MalformedURLException, 211
ProtocolException, 211
SocketException, 211
UnknownHostException, 211
UnknownServiceException, 211
newInstance method
of class Class, 468
Newton, Sir Isaac, 1
next method
of class Random, 648
nextDouble method
of class Random, 649
nextElement method
of class StringTokenizer, 653
of interface Enumeration, 617
nextFloat method
of class Random, 649
nextGaussian method
of class Random, 650
nextInt method
of class Random, 648
nextLong method
of class Random, 648
nextNextGaussian field
of class Random, 647
nextToken method
of class StreamTokenizer, 717
of class StringTokenizer, 652
NoClassDefFoundError class, 611

NoClassDefFoundError class
non-public
classes, in example of qualified names and access control, 101
nonterminal symbols
See also grammars
definition of, notation for, 8
term definition, 7
NORM_PRIORITY field
of class Thread, 591
NoSuchElementException class, 664
NoSuchFieldError class, 611
NoSuchMethodError class, 611
NoSuchMethodException class, 611
Not-a-Number
See NaN (Not-a-Number)
notation
See also names, naming conventions
grammar, 8
notification
notify method, of class Object, 463
notifyAll method, of class Object, 463
notifyObservers method, of class Observable, 644
wait sets and, 416
null
literal, term definition and specification, 27
NullPointerException class, 611
type
literal as source code representation of the value of, 19
term definition and specification, 30
numbers
See also arithmetic; precision; types
conversions of and to, see conversions
errors in handling, see exceptions
manipulating, see
arithmetic
operators
Number class, 487
NumberFormatException class, 611
numeric promotion
binary, 74
specification, 72
term definition, 52
unary, 73
primitive types, see
byte type
char type
double type
float type
floating-point
int type
integers
integral type
long type
short type
Random class, 646
related types, see
boolean
characters
strings
nval field
of class StreamTokenizer, 715
Nygaard, Kristen, 6

O

object-oriented concepts
See class(es); encapsulation; fields; inheritance; method(s); objects
objects
See also arrays; classes; instances; interfaces; types
Class, array, 199
fields that reference, final modifier effect on changes to, 146
finalization attributes, 232
have classes, while variables have types, 47
life cycle of, 233
Object class
no analogue for interfaces, 185
specification, 199, 40
with Class, 458
operations on references to, 39
reachable, finalization implications, 232
reference, see references
state
impact of changes, 39
transient fields not part of, 147
term definition and specification, 38
unreachable, finalization implications, 232
Observable class, 643
Observer interface, 645
Occam, William of, 351
Occam's razor, 351
See also optimization
octal
See also numbers
base, permitted in integer literals, 19
numerals, specification, 20
one of phrase
grammar notation use, 10 one too many, 276

one too many
operators
See also constructors; expressions; initialization; methods; numbers
arithmetic, numeric promotion, specification, 72
assignment, as only way to change the value of a primitive variable, 31
binary, evaluation order, 305
boolean, 36
compound assignment, evaluation order, 305
floating-point, 34
signed infinity produced by overflow, 35
signed zero produced by underflow, 35
integer
divide, divide by zero exception thrown by, 32
overflow not indicated by, 32
underflow not indicated by, 32
integral, 31
list of, 28
operands evaluated before, 307
precedence, in expression evaluation, 308
on reference types, 39
remainder, divide by zero exception thrown by, 32
string concatenation
constructor invocation by, 177
creating new instances with, 38
thread, term definitions, 401
opt subscript
grammar notation use, 8
optimization
during
class loading, techniques for, 219
preparation phase of linking, 221
resolution phase o