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 of linking, 221
final method inlining, 160
finalization, 232
reachable objects reduction, 232
linking
initialization phase of, 227
linkage editing, 222
resolution strategies, 220
optional symbol
term definition, 8
or method
of class BitSet, 621
order
evaluation
arguments lists left-to-right, 305
binary operators, 305
compound assignment, 305
left-hand operand first, 305
operands evaluated before operations, 307
of other expressions, 310
parentheses and precedence respected, 308
execution, thread rules, 403
field initialization, at run-time, 187
finalizer invocations, implications of no ordering imposition, 234
of floating-point values, 33
of occurrence, of initialization of types, 223
thread interaction, consequences of, 400
ordinaryChar method
of class StreamTokenizer, 716
ordinaryChars method
of class StreamTokenizer, 716
origin
of arrays, 195
out field
of class FileNameDescriptor, 760
of class FilterOutputStream, 730
of class System, 580
OutOfMemoryError class, 611
output
See also files; input; streams
BufferedOutputStream class, 732
ByteArrayOutputStream class, 727
FileOutputStream class, 722
FilterOutputStream class, 730
OutputStream class, 720
PipedOutputStream class, 725
overflow
See also arithmetic; exceptions; numbers
floating-point operators, signed infinity produced by, 35
not indicated by integer operators, 32
overloading
See also object-oriented concepts; inheritance; methods
of abstract interface methods
declarations, 190
examples, 191
of constructors, 180
binary compatibility considerations, 257
of methods, 167
binary compatibility considerations, 257
example, 168
term definition, 167, 87
overriding
See also object-oriented concepts; scope
examples, 168, 169, 170, 172, 190
incorrect, 169
vs. hiding, example, 170
incorrect because of throws, example, 174
large example, 172
methods
abstract
in abstract classes, 158
of non-abstract instance methods, 159
binary compatibility considerations, 258
in interfaces, 189
example, 190
instance, 165
requirements in, 166
term definition, 87
Ozymandias, 353

P

packages
binary compatibility considerations, 242
(chapter), 113
declarations, in compilation units, 118
as declared entity, 78
host support for, 115
importing all public types from a, 122
LALR(1) grammar, 442
members, 114
access to, 120
members of, 85
named, in compilation units, 118
names
context in which a name is classified as, 90
fully qualified, 105
hiding, 120
naming conventions, 107
qualified, meaning of, 93
scope of, 120
simple, meaning, 93
unique, 125
unique, importance of, 125
scope of, 81
standard
java.io
package (chapter), 665
checked exceptions defined in, 210
java.lang
checked exceptions defined in, 210
package (chapter), 455
unchecked exceptions defined in, 209
java.net
checked exceptions defined in, 211
java.util
package (chapter), 615
unchecked exceptions defined in, 209
storing in a
database, 117
file system, 115
term definition, 114
unnamed, in compilation units, uses and cautions, 119
Paine, Thomas
American Crisis
shift for yourselves, 650
times that try men's souls, 290
Common Sense, mind of the multitude, 650
panjandrum, 290
parameter(s)
See also modifiers; variables
constructor, 177
assignment during instance creation, 228
binary compatibility considerations, 254
description, 45
initial value, 46
scope, 82
as declared entity, 79
exception
description, 45
initial value, 46
scope, 291, 82
method
binary compatibility considerations, 254
description, 45
initial value, 46
specification of, 156
names, naming conventions, 110
@param tag, specification, 422
scope of, 81, 82
types, method invocation conversion context, 66
parentOf method
of class ThreadGroup, 605
parse method
of class Date, 631
parseInt method
of class Integer, 492
parseLong method
of class Long, 499
parseNumbers method
of class StreamTokenizer, 716
Partridge, Eric, 127

Partridge, Eric
pathSeparator field
of class File, 753
pathSeparatorChar field
of class File, 753
pearls, 417
peek method
of class Stack, 661
Peirce, Charles, 383
Peretti, Hugo E., 28
performance
See optimization
PI field
of class Math, 518
PipedInputStream class, 687
PipedOutputStream class, 725
platform-dependent
native methods are, 161
pointers
See references
NullPointerException class, 611
polling
for asynchronous exceptions, 206
pop method
of class Stack, 661
pos field
of class BufferedInputStream, 700
of class ByteArrayInputStream, 689
of class StringBufferInputStream, 692
POSITIVE_INFINITY field
of class Double, 511
of class Float, 504
pow method
of class Math, 522
precedence
See also expressions
of operators, in expression evaluation, 308
precise
term definition, 205
precision
See also numbers
possible loss of
in narrowing primitive conversion, 55
in widening primitive conversion, 54
preparation
of classes, 221
in Test class example, at virtual machine startup, 216
of interfaces, 221
standard exceptions, AbstractMethodError, 212
prescient store
actions, with threads, 408
preventing
instantiation, 180
with private constructors, 132
prime numbers, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823
primitive
See also numbers
conversion
narrowing, 55
in assignment conversion context, 61
in casting conversion context, 67
not allowed in method invocation conversion context, reasons for, 66
widening, 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
types
as array element types, 194
changing value of variables, 31
fully qualified name for, 105
literal as source code representation of the value of, 19
narrowing conversions, specification, 55
term definition and specification, 30
variables of, specification, 44
widening conversions, specification, 54
printing
print method, of class PrintStream, 740
println method, of class PrintStream, 741
printStackTrace method, of class ThreadGroup, 613
PrintStream class, 738
See Also output
Prior, Matthew, 529
priority
thread, 415
private modifier
See also declarations; modifiers
access
determining, 99
inheritance of class members, example, 141
constructors
access control, example, 105
preventing instantiation with, 132
fields, access control, example, 105
inheritance with, example, 141
methods
abstract not permitted with, 158
access control, example, 105
as implicitly final, 160
in example of qualified names and access control, 105
overriding and hiding not possible with, 166
preventing instantiation by declaring constructors as, 180
Process class, 561
productions
LALR(1) grammar
arrays, 446
blocks, 446
class declarations, 443
constructor declarations, 445
expressions, 450
field declarations, 443
interface declarations, 445
method declarations, 444
statements, 446
static initializers, 444
those used only in, 442
term definition, 7
programming practices
cautions, unnamed package use, 119
promotion
See also numbers
(chapter), 51
numeric, 72
binary, 74
specification, 74
specification, 72
term definition, 52
unary, 73
specification, 73
properties
Properties class, 639
propertyNames method, of class Properties, 640
protected modifier
See also declarations; modifiers
access, 100, 99
inheritance of class members, example, 141
constructors, access control, example, 104
fields, access control, example, 104
inheritance with, example, 141
methods, access control, example, 104
protocols
standard exception, ProtocolException, 211
public modifier
See also declarations; modifiers
access, 99
inheritance of class members, example, 141
classes
access control in, 99
binary compatibility considerations, 243
in example of qualified names and access control, 101
constructors, access control, example, 103
fields
access control, example, 103
interface, implicit in declaration, 187
inheritance with, example, 141
interfaces
binary compatibility considerations, 259
declaration, 184
methods
access control, example, 103
in interfaces, implicit in declaration, 189
superclasses, accessing instances of non-public subclasses through, 142
superinterfaces, accessing instances of non-public subclasses through, 142
types
defined in java.lang, list of, 123
importing from a package, with type-import-on-demand, 122
push method
of class Stack, 661
pushBack field
of class PushbackInputStream, 710
pushBack method
of class StreamTokenizer, 718
PushbackInputStream class, 710
put method
of class Dictionary, 634
of class Hashtable, 637

Q

qualified
See also access; scope
access, term definition, 99
names
access control and, 99
expression, meaning of, 96
fully, 105
method, meaning of, 98
not permitted with parameters, 157
package, meaning of, 93
term definition, 79
type, meaning of, 93
Quayle, J. Danforth, 202
quoteChar method
of class StreamTokenizer, 716

R

Ramanujan, Srinivasa, 224
Random class, 646
random method
of class Math, 526
RandomAccessFile class, 743
Raper, Larry, 237
razor, 351
reachable
See also scope
objects
finalization implications, 232
unloading implications, 235
term definition, 232
read
See also input
read method
of class BufferedInputStream, 700
of class ByteArrayInputStream, 690
of class FileInputStream, 685
of class FilterInputStream, 696
of class InputStream, 680
of class LineNumberInputStream, 707
of class PipedInputStream, 688
of class PushbackInputStream, 710
of class RandomAccessFile, 746
of class SequenceInputStream, 694
of class StringBufferInputStream, 693
readBoolean method
of class DataInputStream, 704
of class RandomAccessFile, 747
of interface DataInput, 669
readByte method
of class DataInputStream, 704
of class RandomAccessFile, 747
of interface DataInput, 669
readChar method
of class DataInputStream, 705
of class RandomAccessFile, 748
of interface DataInput, 670
readDouble method
of class DataInputStream, 705
of class RandomAccessFile, 749
of interface DataInput, 671
readFloat method
of class DataInputStream, 705
of class RandomAccessFile, 748
of interface DataInput, 671
readFully method
of class DataInputStream, 703
of class RandomAccessFile, 746
of interface DataInput, 668
readInt method
of class DataInputStream, 705
of class RandomAccessFile, 748
of interface DataInput, 670
readLine method
of class DataInputStream, 705
of class RandomAccessFile, 749
of interface DataInput, 672
readLong method
of class DataInputStream, 705
of class RandomAccessFile, 748
of interface DataInput, 671
readShort method
of class DataInputStream, 704
of class RandomAccessFile, 748
of interface DataInput, 670
readUnsignedByte method
of class DataInputStream, 704
of class RandomAccessFile, 747
of interface DataInput, 669
readUnsignedShort method
of class DataInputStream, 704
of class RandomAccessFile, 748
of interface DataInput, 670
readUTF method
of class DataInputStream, 705
of class RandomAccessFile, 749
of interface DataInput, 672
recursive, term definition, 8
references
See also expressions; types
conversions
narrowing, 59
widening, 58
in assignment conversion context, 61
in casting conversion context, 67
in method invocation conversion context, 66
to fields, active use, 224
forward
compile-time error
in class variable initialization, 149
in instance variable initialization, 150
permitted in
class type usage, 130
interface type usage, 184
object, value of array variables as, 194
operations, 39
symbolic
binary file format requirements, 239
resolution, 221
code generation implications of, 222
internal table description, 218
term definition, 38
types
array, 194
class, see class
criteria for determining when two are the same, 42
identical, 42
interface, see interface
member, as declared entity, 78
member name, scope of, 81
specification, 37
in class declaration, 128
in interface declaration, 184
variables, specification, 44
regionMatches method
of class String, 538
rehash method
of class Hashtable, 637
release-to-release compatibility
See binary, compatibility
remove method
of class Dictionary, 634
of class Hashtable, 637
removeAllElements method
of class Vector, 658
removeElement method
of class Vector, 657
removeElementAt method
of class Vector, 657
renameTo method
of class File, 758
replace method
of class String, 544
representation
binary, classes and interfaces, verification of, 220
reset method
of class BufferedInputStream, 701
of class ByteArrayInputStream, 691
of class ByteArrayOutputStream, 728
of class FilterInputStream, 698
of class InputStream, 683
of class LineNumberInputStream, 709
of class StringBufferInputStream, 693
resetSyntax method
of class StreamTokenizer, 715
resolution
in Test class example, at virtual machine startup, 216
late, in class and interface linking, 220
lazy, 217
in class and interface linking, 220
name conflicts
avoiding with multiply inherited fields, 153
context use in avoiding, 89
static, in class and interface linking, 220
symbolic references, 221
code generation implications of, 222
in internal table for class loader, description, 218
resolveClass method
of class ClassLoader, 560
result
of expression evaluation, term definition, 301
resume method
of class Thread, 596
of class ThreadGroup, 606
return statement
definite assignment, 397
as reason for abrupt completion, 264
specification, 286
@return tag
specification, 422
reuse
software, see binary, compatibility
reverse method
of class StringBuffer, 557
right-hand side
term definition, 7
rint method
of class Math, 525
risk of failure, 202
Ritchie, Dennis M., 6
Rodgers, Richard., 126
rose, 111
rounding
IEEE 754 standard default mode, support required for, 35
round method, of class Math, 525
round to nearest, term definition, 35
round toward zero, term definition, 35
run-time
checks of expressions, 302
errors, see exceptions
run method
of class Thread, 594
of interface Runnable, 586
runFinalization method
of class Runtime, 566
of class System, 583
Runnable interface, 586
Runtime class, 563
RuntimeException class, 611
unchecked exceptions found in, 164
state, linking binary objects into, 220
type, as incorrect terminology, 47
validity checks, casting conversion requirements, 68

S

Saturday Night Live, 468
save method
of class Properties, 641
scope
See also declarations; inheritance; names; object-oriented concepts
exception parameters, 291
initializer execution relative to issues of, 175
of names
class, 130, 81
formal parameter, 157
hiding rules, 83
import, 87
interface, 184, 81
local variables, 267, 45, 82
member, 138, 81
package, 120, 81
parameters
of constructors, 82
of exception handlers, 82
formal, 157, 81
simple, 81
term definition, 81
type initialization order restrictions, 223
Scott, Sir Walter, 646
search method
of class Stack, 662
Sebastian, John, 273
security
See also access control; exceptions; types; virtual machine
ClassLoader class, 558
internal symbolic reference table, role in maintaining, 218
SecurityException class, 611
SecurityManager class, 569
standard exceptions, SecurityException, 209
type system, verification importance to, 244
@see tag
specification, 421
seed field
of class Random, 646
seek method
of class RandomAccessFile, 745
self-reference, 788, 805, 808
semantics
See also grammars; lexical; syntax
errors in, exceptions as mechanism for signaling at run-time, 201
expression, (chapter), 301
names
context role, 90
determining, 89
expressions, 95
methods, 98
package, 93
types, 93
verifying during linking process, 220
semicolon (;)
as method body, 164
separators
list of, 27
separator field, of class File, 753
separatorChar field, of class File, 753
as token, 7
sequences
escape, for character and string literals, 26
SequenceInputStream class, 694
set
set method, of class BitSet, 620
setChanged method, of class Observable, 644
setCharAt method, of class StringBuffer, 552
setDaemon method
of class Thread, 597
of class ThreadGroup, 607
setDate method, of class Date, 627
setElementAt method, of class Vector, 656
setHours method, of class Date, 628
setLength method, of class StringBuffer, 551
setLineNumber method, of class LineNumberInputStream, 709
setMaxPriority method, of class ThreadGroup, 607
setMinutes method, of class Date, 628
setMonth method, of class Date, 627
setName method, of class Thread, 596
setPriority method, of class Thread, 597
setProperties method, of class System, 582
setSeconds method, of class Date, 628
setSecurityManager method, of class System, 580
setSeed method, of class Random, 647
setSize method, of class Vector, 658
setTime method, of class Date, 629
setYear method, of class Date, 626
Seuss, Dr., 125
shadowing
See hiding
Shakespeare, William
As You Like It, 51
Hamlet, 470
Love's Labour's Lost, 28
Macbeth, 406
Measure for Measure, 28
A Midsummer Night's Dream, 28
Othello, 562
Romeo and Juliet, 111
Troilus and Cressida, 28
Two Gentlemen of Verona, 28
The Winter's Tale, 236
Shelley, Percy Bysshe, 353
Sheridan, Richard Brinsley, 471
short type
See also integral types; numbers
value range, 31
side effects
See also expressions
from expression evaluation, reasons for, 301
signature
of constructors, 177
of methods, 157
methods with the same, inheriting, 166
simple names
See also identifiers; names
expression, meaning of, 95
method, meaning of, 98
package, meaning of, 93
term definition, 79
type, meaning of, 93
sin method
of class Math, 518
single quote (')
escape sequence, 27
size method
of class BitSet, 621
of class ByteArrayOutputStream, 728
of class DataOutputStream, 737
of class Dictionary, 633
of class Hashtable, 636
of class Vector, 658
skip
skip 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 StringBufferInputStream, 693
skipBytes method
of class DataInputStream, 704
of class RandomAccessFile, 747
of interface DataInput, 669
slashSlashComments method
of class StreamTokenizer, 717
slashStarComments method
of class StreamTokenizer, 717
sleep method
of class Thread, 600
sockets
standard exceptions, SocketException, 211
Solomon, 193
sorting
Unicode, reference for details on, 18
source code
compatibility, contrasted with binary compatibility, 241
transformations that preserve binary compatibility, 239
Southey, Robert, 350
spittoon
See cuspidor
sqrt method
of class Math, 521
square brackets ([])
in array
type declaration, 194
variable declaration, 194
stacks
EmptyStackException class, 663
Stack class, 661
StackOverflowError class, 611
standard exceptions
EmptyStackException, 209
StackOverflowError, 212, 213
standard
exceptions
checked, 210
runtime, 208
unchecked, 209
standard classes
AbstractMethodError, 611
ArithmeticException, 611
ArrayStoreException, 611
BitSet, 618
Boolean, 469
BufferedInputStream, 699
BufferedOutputStream, 732
ByteArrayInputStream, 689
ByteArrayOutputStream, 727
Character, 471
Class, 199, 466
ClassCastException, 611
ClassCircularityError, 611
ClassFormatError, 611
ClassLoader, 216, 218, 219, 558
ClassNotFoundException, 611
CloneNotSupportedException, 611
DataInputStream, 703
Date, 622
Dictionary, 633
Double, 308, 510
EmptyStackException, 663
Error, 163, 211, 611
Exception, 611
ExceptionInInitializerError, 611, 614
File, 752, 753
FileInputStream, 684
FileOutputStream, 722
FilterInputStream, 696
FilterOutputStream, 730
Float, 503
Hashtable, 635
IllegalAccessError, 611
IllegalAccessException, 611
IllegalArgumentException, 611
IllegalThreadStateException, 611
IncompatibleClassChangeError, 611
IndexOutOfBoundsException, 611
InputStream, 680
InstantiationError, 611
Integer, 488
InternalError, 611
InterruptedException, 611
LineNumberInputStream, 707
LinkageError, 211, 611
Long, 495
Math, 517
NegativeArraySizeException, 611
NoClassDefFoundError, 611
NoSuchElementException, 664
NoSuchFieldError, 611
NoSuchMethodError, 611
NoSuchMethodException, 611
NullPointerException, 611
Number class, 487
NumberFormatException, 611
Object, 185, 199, 40, 41, 458
Observable, 643
OutOfMemoryError, 611
OutputStream, 720
PipedInputStream, 687
PipedOutputStream, 725
PrintStream, 738
Process, 561
Properties, 639
PushbackInputStream, 710
Random, 646
RandomAccessFile, 743
Runtime, 563
RuntimeException, 164, 611
SecurityException, 611
SecurityManager, 569
SequenceInputStream, 694
Stack, 661
StackOverflowError, 611
StreamTokenizer, 712
String, 19, 25, 41, 531
StringBuffer, 548
StringBufferInputStream, 692
StringTokenizer, 651
System, 579
Thread, 206
Thread class, 587
ThreadDeath, 611
ThreadGroup, 206, 602
Throwable, 611
UnknownError, 611
UnsatisfiedLinkError, 611
Vector, 654
VerifyError, 611
VirtualMachineError, 611
standard interfaces
Cloneable interface, 465
DataInput interface, 667
DataOutput interface, 674
Enumeration interface, 617
FileNameFilter interface, 759
Observer interface, 645
Runnable interface, 586
Star Trek, 793, 805, 820
start method
of class Thread, 594
startsWith method
of class String, 540
startup
virtual machine, 215
state
IllegalThreadStateException class, 611
not shared by primitive values, 31
object
impact of changes, 39
transient fields not part of persistent, 147
statements
See also constructors; control flow; expressions; initializers; methods
break
definite assignment, 397
specification, 283
(chapter), 263
completion of
abrupt, reasons for, 264
normal, reasons for, 264
continue
definite assignment, 397
specification, 285
definite assignment, 393
do
definite assignment, 395
specification, 279
empty
definite assignment, 393
specification, 271
expression
definite assignment, 394
specification, 272
for
definite assignment, 396
specification, 280
general specification, 269
if
dangling else handling, 270
definite assignment, 394
if-then, specification, 273
if-then-else, specification, 274
labeled
definite assignment, 394
specification, 271
LALR(1) grammar productions, 446
local variable declarations
execution of, 269
specification, 265
return
definite assignment, 397
specification, 286
switch
definite assignment, 395
specification, 274
synchronized
definite assignment, 397
specification, 289
throw
definite assignment, 397
specification, 287
try
definite assignment, 398
try-catch, specification, 291
try-catch-finally, specification, 293
unreachable, conservative flow analysis detection of, 295
while
definite assignment, 395
specification, 277
static initializers
See also initialization
LALR(1) grammar productions, 444
static modifier
See also declarations; modifiers
for fields, 145
binary compatibility considerations, 253
creating during the preparation phase of linking, 221
declaring class variables using, 145
default initialization of during the preparation phase of linking, 221
implicit in interface member declarations, 187
initialization of, 149, 175
binary compatibility considerations, 259
initializers
as components of a class body, 138
for, 175
for methods
declaring class methods with, 160
hiding by, 165
not permitted in interface method declarations, 189
reason why constructors do not use, 178
Stein, Gertrude
Arthur a Grammar
arithmetic, 450
burnt ivy, 440
finishing early, 453
grammar in a title, 433
grammar is useless, 445
pretty names, 441
successions of words, 446
vocabulary, 440
Rooms, 349
Sacred Emily, 111
stop method
of class Thread, 595
of class ThreadGroup, 605
store
array, exception, 199
storing
packages
in a database, 117
in a file system, 115
streams
See also files; input; output
BufferedInputStream class, 699
BufferedOutputStream class, 732
ByteArrayInputStream class, 689
ByteArrayOutputStream class, 727
FileInputStream class, 684
FileOutputStream class, 722
FilterInputStream class, 696
FilterOutputStream class, 730
LineNumberInputStream class, 707
OutputStream class, 720
PipedInputStream class, 687
PipedOutputStream class, 725
PrintStream class, 738
PushbackInputStream class, 710
SequenceInputStream class, 694
StreamTokenizer class, 712
StringBufferInputStream class, 692
string(s)
See also characters; numbers; primitive types; String class; StringBuffer class
character arrays not the same as, 199
concatenation operator (+)
constructor invocation by, 177
creating new instances with, 38
conversion, 67
context specification, 67
specification, 60
to numeric types, NumberFormatException, 209
literals
escape sequences for, 26
interning of, 25
term definition and specification, 25
standard exceptions, UTFDataFormatException, 210
String class, 531
creating instances, with string concatenation operator, 41
literal as source code representation of the value of, 19
specification, 41, 531
string literal as reference to an instance of, 25
StringBuffer class, 548
StringBufferInputStream class, 692
StringTokenizer class, 651
substrings, substring method of String class, 543
Stroustrup, Bjarne, 6
subclasses
See also class(es); interfaces; superclasses; superinterfaces
declaration, 133
direct, extending classes with, 133
relationship to direct subclass, 134
subpackages
See also packages
as package members, 85
substring method
of class String, 543
super keyword
accessing
overridden methods with, 165
superclass members with, in expression evaluation, 322
binary compatibility considerations, 247
not permitted in
class variable initialization, 150
explicit constructor invocation, 179
interface field declarations, 187
permitted in instance variable initialization, 150
superclass(es)
See also classes; fields; interfaces; methods; packages; subclasses; superinterfaces
accessing fields with super, expression evaluation, 322
of array is Object, 199
binary compatibility considerations, 243
direct
declaration, with extends clause, 133
term definition, 133
extending classes with, 133
public, accessing instances of non-public subclasses through, 142
superinterface(s)
See also classes; fields; interfaces; methods; packages; subclasses
binary compatibility considerations, 243, 260
direct
declaration, with implements clause, 135
term definition, 135
of interface, declaration, 185
public, accessing instances of non-public subclasses through, 142
term definition, 135
suspend method
of class Thread, 596
of class ThreadGroup, 606
sval field
of class StreamTokenizer, 715
swapping
threads example, 409
sweat, 51
Sweet, Richard, 6
Swift, Jonathan, 618
switch statement
See also statements
definite assignment, 395
local variable declaration specification, impact on, 45
specification, 274
symbolic references
binary file format requirements, 239
resolution, 221
code generation implications of, 222
internal table description, 218
symbols
See also identifiers; name; variables
goal
CompilationUnit, 8
Input, 7
term definition, 7
nonterminal
notation for definition of, 8
term definition, 7
optional, term definition, 8
terminal, term definition, 7
synchronization
See also locks; threads
exception mechanism integration with, 202
initialization implications of, 225
locks, 415
use by synchronized methods, 161
use by synchronized statement, 289
standard exceptions
IllegalMonitorStateException, 209
IllegalThreadStateException, 209
InterruptedException, 210
InterruptedIOException, 210
synchronized modifier
See also modifiers
in method declarations, 161
methods, binary compatibility considerations, 256
not permitted in interface field declarations, 187
not permitted in interface method declarations, 189
reason why constructors do not use, 178
specification, 416
synchronized statement
definite assignment, 397
operations, 416
specification, 289
term definition, 399
volatile fields used for, with threads, 147
syntactic
See also lexical; semantics
classification, of a name according to context, 90
grammar, 8
LALR(1) grammar, 440
term definition, 8
System class, 579
system operations
See ClassLoader class; Process class; Runtime class; SecurityManager class; System class

T

tagged paragraphs
types of, 420
tan method
of class Math, 519
term definitions
abrupt completion, 264, 304
access, 77
accessible, 99
control, 99
qualified, 99
action, 401
by main memory
lock, 401, 402
read, 401, 402
unlock, 401, 402
write, 401, 402
by thread
assign, 401, 402
load, 401, 402
store, 401, 402
unlock, 401, 402
use, 401, 402
write, 401, 402
activation frame, 336
active use, 223
alphabet, 7
ambiguous member, 188
applicable, 325
method, 193
array, 193
components, 44, 193
element type, 193
type, 193
element, 193
empty, 193
initializer, 196
length of, 193
type, 193
assign, as thread action, 402
assignable to, 61
assignment, 61, 369
compatible with, 61
associated label, 275
atomic, 401
binary
compatibility, 240
numeric promotion, 74
block, 265
body
of class, 138
of constructor, 178
of interface, 185
of method, 164
break binary compatibility with, 240
break target, 283
caller, 204
can complete normally, 295
cast operator, 67, 335, 350
catch clause, 201, 290
caught, 201, 288
checked exceptions, 203
class(es), 127, 128
abstract, 131
body, 138
declaration, 128
error, 203
exception, 203
final, 133
finalization, 235
initialization, 223
methods, 160
modifiers, 130
of object, 47
runtime exception, 203
same, 42
unloading, 235
variables, 145
clone, 460
comments, 15
documentation 15, (chapter), 419
end-of-line, 15
traditional, 15
compatibility
binary, 240
compilation unit, 118
compile-time
declaration, 332
type, 43
complete
abruptly, 264, 304
normally, 264, 295, 304
component, 193
of array, 44, 193
type of array, 193
constant
expression
compile-time, 381
field, 186, 223
primitive, 251
constructor(s), 176
default, 180
parameter, 45, 177
contain, 263
immediately, 263
context of conversion, 52
continue target, 285
contract, 241
control
access, 99
conversion(s), 51
assignment, 61
casting, 67
contexts, 52
identity, 54
method invocation, 66
primitive
narrowing, 55
widening, 54
reference
narrowing, 59
widening, 58
string, 355
declaration(s), 78
array variable, 194
class, 128
variable, 44
compile-time, 332
constant, 186
constructor, 176
field, 143, 186
import, 120
instance variable, 44
interface, 184
local variable, 45
statement, 265
method, 155, 189
package, 118
parameter
constructor, 45
exception, 45,
method, 45
single-type import, 121
type, 124
type-import-on-demand, 121
declarator, 266
default
constructor, 180
value, 46
definite assignment, 383
definitely assigned
after, 385
when false, 385
when true, 385
before, 385
denormalized, 33, 34
direct
extension, 183
subclass, 133
superclass, 133
superinterface, 135, 185
directly implement, 183
documentation comment (chapter), 419
dynamic method lookup, 335
dynamically enclosed, 204
element, 193
type, 193
empty
array, 193
statement, 271
enclosed, dynamically, 204
error classes, 203
escape
sequence, character and string, 26
Unicode, 12
evaluation
evaluated, 301
expression, result of, 301
order, 305
exception
caller of, 204
caught, 201
checked, 203
classes, 202
checked, 203, 210
runtime, 203, 208
standard, 208
unchecked, 203
handler, 290
parameter, 45
polling for, 206
precise, 205
thrown, 201
unchecked, 203
executed, 301
exit of virtual machine, 235
expression, 301
constant, 381
statement, 272
extension, direct, 183
field, 143, 186
constant, 223
declaration, 143
final, 146, 187
non-static, 145
static, 145, 186
transient, 147
volatile, 147
finalizable, 232
finalization
class, 235
object, 231
finalized, 232
finalizer, 231
finalizer-reachable, 232
formal parameter, 156, 177
frame activation, 336
goal symbol, 7
gradual underflow, 34
grammar
context-free, 7
lexical, 7
syntactic, 8
handler of exception, 290
handles, 204
hide, 144, 165
identifier, 17
immediately contain, 263
implement, 87, 135, 165
directly, 183
implemented, 152
import declaration
on demand, 122
single type, 121
inexact, 35
infinities, 33
inherited, 85, 152
inherits, 165
initialization of class or interface, 223
initializer
array, 196
static, 175
variable, 149
input elements, 14
instance
of class, 38
methods, 160
variables, 145
interface
abstract, 184
body, 185
initialization, 223
same, 42
iteration statements, 285
Java, vii
digits, 17
letters, 17
keyword, 18
label, 271
associated, 275
language, 7
left of
to the, 15
left-hand side, 7
length of array, 193
line terminator, 13
linking, 220
linkage editing, 222
literal, 19
boolean, 23
character, 24
floating-point, 22
integer, 19
null, 27
string, 25
load action by thread, 402
loading, 218
local variable, 45
declaration statement, 265
locks, 401
lock action
by main memory subsystem, 402
by thread, 402
unlock action
by main memory subsystem, 402
by thread, 402
lookup,
dynamic method, 335
loss of precision, 54
main memory, 401
master copy, 401
maximally specific, 327
members, 85
ambiguous, 188
dynamic lookup, 335
memory
main, 401
working, 401
method(s), 155
abstract, 158, 189
accessible, 325
applicable, 325
body, 164
class, 160
final, 160
hidden, 165
instance, 160
interface, 189
lookup
dynamic, 335
maximally specific, 237
more specific, 327
most specific, 325, 327
native, 161
non-static, 160
overloaded, 167
overridden, 165
parameter, 45
signature, 157
static, 160
synchronized, 161
the most specific, 327
modifiers
class, 130
constructor, 177
field, 144
interface, 184
method, 157
monitors, 399
more specific, 327
most specific, 325, 327
name(s), 79
ambiguous, 89
contextually ambiguous, 89
expression, 91
method, 91
package, 90
qualified, 79
simple, 79
type, 90
unique package, 125
NaN (Not-a-Number), 33
narrowing
primitive conversion, 55
reference conversion, 59
non-static
field, 145
method, 160
nonterminal, 7
normal completion, 264, 295, 304
notification, 399, 416
numeric promotion, 72
object(s), 38
class of, 47
target, 335
operators, 28
additive, 355
assignment, 369
bitwise, 365
cast, 350
equality, 362
logical, 365
multiplicative, 351
relational, 360
shift, 359
unary, 346
order of evaluation, 305
ordered, 33
overload, 165, 190
overloading 167
override, 189
overriding, 189
package(s), 114
unique name, 125
paragraph
tagged, 420
parameter, 156
constructor, 45, 177
exception handler, 45, 290
formal, 156, 177
method, 45, 156
passive use, 223
pointer, 38
polling for exceptions, 206
precise exception, 205
precision
loss of, 54
preparation, 221
prescient store, 408
priority, threads, 415
primitive constant, 251
primitive conversion
narrowing, 55
widening, 54
productions, 7
promotion
numeric, 72
binary, 74
unary, 73
sweat only but for, 51
qualified
access, 99
name, 79
reachable, 232, 263, 295
read action
by main memory, 402
by thread, 402
reason, 202, 264, 304
recursive, 8
reference, 38
conversion
narrowing, 59
widening, 58
target, 333
types, 37
resolution, 221
late, 220
lazy, 220
result, 301
right of
to the, 15
right-hand side, 7
round
to nearest, 35
toward zero, 35
runtime exception classes, 203
same
class, 42
interface, 42
type, 42
scope, 81
separator, 25
signature, 157
simple name, 79
specific
maximally, 327
more, 327
most, 325, 327
the most, 327
statements, 263
empty, 271
expression, 272
iteration, 285
labeled, 271
local variable declaration, 264
unreachable, 295
static
field, 145
initializers, 175
method, 160
resolution, 220
store
action by thread, 402
prescient, 408
strongly typed, 29
subclass, 134
direct, 133
subinterface, 185
superclass, 134
direct, 133
superinterfaces, 135, 185
direct, 135, 185
symbol
goal, 7
nonterminal, 7
optional, 8
terminal, 7
synchronizing, 399
target
break, 283
continue, 285
object, 335
reference, 333
terminal symbol, 7
the most specific, 325, 327
thread, 399
thrown, 201, 202
throws clause, 163
token, 7, 14,
type(s), 30
boolean, 31
compile-time, 43
floating-point, 31, 33
import
on demand, 121
single, 121
integral, 31
null, 30
numeric, 31
primitive, 30
reference, 37
same, 42
typed
strongly, 29
unary numeric promotion, 73
unchecked exception, 203
classes, 203
underflow
gradual, 34
unfinalized, 232
Unicode escapes, 12
unique package name, 125
unloading of classes, 235
unlock, 399
action
by main memory, 402
by thread, 402
unordered, 33
unreachable, 232, 295
use
action by thread, 402
active, 223
passive, 223
value
default, 46
of expression, 302
variable(s), 401, 43
class, 44, 145
instance, 44, 145
local, 45
verification, 220
virtual machine exit, 235
wait set, 416
white space, 15
widening
primitive conversion, 54
reference conversion, 58
working
copy, 401
memory, 401
write action
by main memory, 402
by thread, 402
terminal symbol
term definition, 7
terminators
line
carriage return and linefeed characters as, 25
carriage return character as, 25
linefeed character as, 25
term definition, 13
Test program, how to run, 5
this keyword
accessing hidden fields with, 269
evaluation of, 313
during instance creation, 228
not permitted
in class variable initialization, 150
in explicit constructor calls, 179
in interface field declarations, 187
permitted in instance variable initialization, 150
Thomas à Kempis, 528
Thompson, William (Lord Kelvin), 301
threads
See also synchronization
(chapter), 399
constraints on relationships among actions of, 403
creation, 415
IllegalThreadStateException class, 611
initialization implications of multiple, 225
interaction order, consequences of, 400
locks acquisition and release, by synchronized statement, 289
operations, term definitions, 401
out-of-order writes example, 409
standard exceptions
IllegalMonitorStateException, 209
IllegalThreadStateException, 209
InterruptedException, 210
InterruptedIOException, 210
swapping example, 409
synchronized modifier, methods, declaration, 161
termination and virtual machine exit, 235
Thread class, 587
ThreadDeath class, 611
ThreadGroup class, 602
threads method, of class ThreadGroup, 608
threadsCount method, of class ThreadGroup, 607
volatile fields use with, 147
throw
See also control flow; exceptions
throw statement
as reason for abrupt completion, 264
definite assignment, 397
specification, 287
Throwable class, 611
Throwable method, of class ThreadGroup, 612
throws clause
checked exception classes named in, 203
constructors, 178
binary compatibility considerations, 256
incorrect overriding because of, example, 174
methods, 163
binary compatibility considerations, 256
toBinaryString method
of class Integer, 491
of class Long, 499
toByteArray method
of class ByteArrayOutputStream, 728
toCharArray method
of class String, 537
toGMTString method
of class Date, 629
toHexString method
of class Integer, 491
of class Long, 498
tokens
See also grammars
term definition, 7, 14
Tokens, The, 28
toLocaleString method
of class Date, 629
toLowerCase method
of class Character, 482
of class String, 544
toOctalString method
of class Integer, 491
of class Long, 498
toString method
of class BitSet, 619
of class Boolean, 470
of class ByteArrayOutputStream, 729
of class Character, 473
of class Class, 466
of class Date, 625
of class Double, 511, 513
of class File, 754
of class Float, 504, 506
of class Hashtable, 636
of class Integer, 489, 490
of class Long, 496, 497
of class Object, 458
of class StreamTokenizer, 719
of class String, 534
of class StringBuffer, 550
of class Thread, 594
of class ThreadGroup, 604, 612
of class Vector, 656
totalMemory method
of class Runtime, 565
toTitleCase method
of class Character, 485
toUpperCase method
of class Character, 484
of class String, 545
traceInstructions method
of class Runtime, 566
traceMethodCalls method
of class Runtime, 566
transient modifier
See also declarations; modifiers
fields, 147
binary compatibility considerations, 253
not permitted in interface field declarations, 187
translations
lexical, steps involved in, 12
trim method
of class String, 545
trimToSize method
of class Vector, 658
TRUE field
of class Boolean, 469
try statements
See also control flow; exceptions; statements
definite assignment, 398
exception handling role of, 204
specification, 290
try-catch statement, specification, 291
try-catch-finally statement, specification, 293
TT_EOF field
of class StreamTokenizer, 714
TT_EOL field
of class StreamTokenizer, 714
TT_NUMBER field
of class StreamTokenizer, 714
TT_WORD field
of class StreamTokenizer, 714
ttype field
of class StreamTokenizer, 714
types
See also arrays; classes; interfaces; primitive, types
argument values, method invocation conversion context, 66
array
members of, 88
syntax and specification, 194
binary compatibility considerations, 241
boolean
Boolean literal specification, 23
term definition and specification, 36
(chapter), 29
char
character literal specification, 24
term definition and specification, 30
class
members of, 86
names, scope of, 130
naming conventions, 108
data values relation to, 30
declaration of, as members of packages, 124
double, floating-point literal specification, 22
element of, arrays, 194
errors, run-time testing, 303
expression
assignment conversion, 61
how determined, 47
of expressions, 302
float, floating-point literal specification, 22
floating-point, term definition and specification, 33
imported
as declared entity, 78
scope of, 81
importing, compilation units, 120
initialization of, 223
int, integer literal specification, 20
integral, 31
interface
implications for variables and expressions, 48
members of, 87
naming conventions, 108
scope of name of, 184
LALR(1) grammar, 440
local variables, declaration of, 266
long, integer literal specification, 20
name(s)
context in which a name is classified as, 90
qualified, meaning of, 94
simple, meaning of, 93
null, term definition and specification, 30
as package members, 114
parameter, method invocation conversion context, 66
primitive
as array element types, 194
do not share state, 31
fully qualified name, 105
term definition and specification, 30
variables, specification, 44
reference
as array element types, 194
criteria for determining when two are the same, 42
member
as declared entity, 78
scope of, 81
specifying with
class declaration, 128
interactive declaration, 184
term definition and specification, 37
variables, specification, 44
run-time, as incorrect terminology, 47
safety of, importance of verifier to maintaining, 244
String, see String class
system, security of, ClassLoader internal symbolic reference table role in maintaining, 218
term definition and specification, 30
usage, 42
in declarations and expressions, 43
of variable
assignment conversion of expressions, 61
how determined, 47
while objects have classes, 47
where used, 42

U

unary
numeric promotion, specification, 73
uncaughtException method
of class ThreadGroup, 610
unchecked
exceptions, standard, 209
underflow
floating-point operators, signed zero produced by, 35
integer operators, not indicated by, 32
unfinalized
as object attribute, 232
term definition, 232
Unicode character set
See also characters
character sequences, represented by instances of class String, 41
composite characters, contrasted with the Unicode decomposed characters, 18
escapes, 13
specification for handling, 12
term definitions, 12
use when suitable font not available, 13
handling in package names, 117
lexical grammar use in terminal symbols, 7
sorting, reference for details on, 18
The Unicode Standard (book), 6
writing any character in, using ASCII characters in escapes, 11
UnknownError class, 611
unloading
See also linking; loading
of classes, 235
of interfaces, 235
unreachable
See also exceptions
objects, finalization implications, 232
statements, conservative flow analysis detection of, 295
term definition, 232
unread method
of class PushbackInputStream, 711
UnsatisfiedLinkError class, 611
update method
of interface Observer, 645
URLs
standard exceptions, MalformedURLException, 211
UTC method
of class Date, 630

V

valid method
of class FileNameDescriptor, 760
values
See also assignment; initialization; primitive, types; variables
boolean, term definition and specification, 36
(chapter), 29
data, relation to types, 30
expressions, variables as, 302
floating-point, term definition and specification, 33
integral, term definition and specification, 31
primitive, term definition and specification, 30
reference, see references; 38
relation to types, 30
return, specifying method with no, 155
valueOf method
of class Boolean, 470
of class Double, 514
of class Float, 507
of class Integer, 493
of class Long, 500
of class String, 545
variables, initial and default, 46
variables
See also data structures; fields; identifiers; scope
assignment conversion, 61
(chapter), 29
double, nonatomic treatment of memory operations on, 405
interaction with locks, rules about, 407
kinds of
array, see arrays, components
class, see fields, class, static
constructor parameters, see parameters, constructor
exception-handling parameters, see exceptions, parameters
instance, see fields, class, non-static
local, see variables, local
method parameters, see parameters, method
LALR(1) grammar, 440
local, 267
declaration statements, 265
as declared entity, 79
definite assignment, (chapter), 383
definite assignment, declarations, 393
description, 45
hiding of names by, 269
naming conventions, 110
scope of, 82
long, nonatomic treatment of, memory operations on, 405
objects compared with, 47
primitive type
changing value of, 31
specification, 44
reference type, specification, 44
term definition, and specification, 43
thread use constraints, 404
type of, how determined, 47
values
of expressions, 302
held by different types, summary of, 29
initial and default, 46
volatile, rules about, 407
Vector class, 654

Vector class
See also data structures
standard exceptions, NoSuchElementException, 209
verification
See also security
of binary representation, of classes and interfaces, 220
internal table of loaded classes and interfaces, purpose of, 218
standard exceptions, VerifyError, 212
type safety dependence on existence and use of, 244
VerifyError class, 611
@version tag
specification, 422
virtual machine
See also exceptions; optimization
class file format specified in, 238
errors, 212
InternalError, as asynchronous exception cause, 206
exception handling by, 201
exit, criteria for, 235
object life cycle in, 233
startup, 215
VirtualMachineError class, 611
virtue, 18
void keyword
See also methods
casting to, not permitted, 272
methods
expression return statement not permitted in, 164
no return value specified by, 155
volatile modifier
See also declarations; modifiers
fields, 147
binary compatibility considerations, 253
final declaration not permitted for, 148
used for synchronization by threads, 147
not permitted in interface field declarations, 187
variables, rules about, 407

W

wait
See also synchronization
wait method, of class Object, 461
wait sets, notification and, 416
waitFor method, of class Process, 562
warp factors, 1, 8, 24, 64, 125, 216, 343, 512, 729
Webb, Jim(my)
Paper Cup, 335
Up, Up and Away, 606
Weiss, George David, 28
while statement
See also control flow
definite assignment, 395
specification, 277
white space
term definition, 15
whitespaceChars method
of class StreamTokenizer, 716
Whitman, Walt
Carol of Occupations, 29
Passage to India, 292
Song of the Broad-Axe, 176
Song of the Universal, 261
Walt Whitman, 75
widening
See also conversions
primitive conversion
in assignment conversion context, 61
in binary numeric promotion context, 74
in casting conversion context, 67
in method invocation conversion context, 66
specification, 54
in unary numeric promotion context, 73
reference conversion
in assignment conversion context, 61
in casting conversion context, 67
in method invocation conversion context, 66
specification, 58
Wilde, Oscar
Charmides, 661
Humanitad, 662
wordChars method
of class StreamTokenizer, 716
Wordsworth, William
Apology for the Foregoing Poems, 304
Maternal Grief, 191
Monks and Schoolmen, 399
To the Same Flower, 49
Yarrow Unvisited, 516
wrapper classes
See Boolean class; Character class; Double class; Float class; Integer class; Long class
write
write method
of class BufferedOutputStream, 733
of class ByteArrayOutputStream, 728
of class DataOutputStream, 735
of class FileOutputStream, 723
of class FilterOutputStream, 730
of class OutputStream, 720
of class PipedOutputStream, 726
of class PrintStream, 739
of class RandomAccessFile, 749
of interface DataOutput, 674
writeBoolean method
of class DataOutputStream, 735
of class RandomAccessFile, 750
of interface DataOutput, 675
writeByte method
of class DataOutputStream, 735
of class RandomAccessFile, 750
of interface DataOutput, 675
writeBytes method
of class DataOutputStream, 736
of class RandomAccessFile, 751
of interface DataOutput, 677
writeChar method
of class DataOutputStream, 736
of class RandomAccessFile, 750
of interface DataOutput, 676
writeChars method
of class DataOutputStream, 737
of class RandomAccessFile, 751
of interface DataOutput, 678
writeDouble method
of class DataOutputStream, 736
of class RandomAccessFile, 751
of interface DataOutput, 677
writeFloat method
of class DataOutputStream, 736
of class RandomAccessFile, 751
of interface DataOutput, 677
writeInt method
of class DataOutputStream, 736
of class RandomAccessFile, 750
of interface DataOutput, 676
writeLong method
of class DataOutputStream, 736
of class RandomAccessFile, 750
of interface DataOutput, 676
writeShort method
of class DataOutputStream, 735
of class RandomAccessFile, 750
of interface DataOutput, 676
writeTo method, of class ByteArrayOutputStream, 729
writeUTF method
of class DataOutputStream, 737
of class RandomAccessFile, 751
of interface DataOutput, 678
written field
of class DataOutputStream, 734

X

xor method
of class BitSet, 621

Y

Yeats, William Butler, 621
yield method
of class Thread, 600

Z

zero
See also exceptions; numbers
divide by, exceptions thrown by integer divide and remainder operators, 32

Contents | Prev | Next | Index

Java Language Specification (HTML generated by dkramer on August 01, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com