next( ), 459, 460, 730
nextAfter( ), 420
nextBoolean( ), 517
nextBytes( ), 517
nextDouble( ), 202, 517, 545, 547
nextElement( ), 487, 504
nextFloat( ), 517
nextGaussian( ), 517
nextInt( ), 517
nextLong( ), 517
nextToken( ), 504, 591
nextUp( ), 420
nextX( ) Scanner methods, 541, 543, 545, 547
table of, 543
NIO, 813, 815–825
copying a file using, 824–825
packages, list of, 815
reading a file using, 819–822
writing to a file using, 822–824
NORM_PRIORITY, 236, 422
NoSuchElementException, 444, 446, 465,
543, 549
NoSuchFieldException, 218
NoSuchMethodException, 218, 274
NOT operator
bitwise unary (~), 62, 63, 64–65
Boolean logical unary (!), 71, 72
notepad, 406–407, 408
notify( ), 181, 243, 245–246, 252, 413, 808
notifyAll( ), 181, 243, 413
notifyObservers( ), 518, 519
NotSerializableException, 596
null, 32
Null statement, 85
NullPointerException, 214, 218, 441, 443, 444,
445, 446, 458, 464, 465, 466, 481, 494, 550
Number class, 265, 386
NumberFormat class, 525, 840
NumberFormatException, 218, 266, 631
OO
Oak, 6
Object class, 181–182, 292, 316, 412
as data type, problems with using,
320–322, 485
methods, table of, 181, 412–413
Object reference variables
assigning, 111
declaring, 109
and cloning, 413
and dynamic method dispatch, 174–177
interface, 195–196
to superclass reference variable, assigning
subclass, 162
OBJECT tag, 618, 630
Object-oriented programming (OOP), 5, 6,
15–21
model in Java, 11
Object(s), 17, 105, 110
bitwise copy (clone) of, 413
creating, 107, 109–110
initialization with constructor, 117, 119
to method, passing, 133–134
monitor, implicit, 225, 239
as parameters, 130–132
returning, 134–135
serialization of.SeeSerialization
type at run time, determining, 300–302
Object.notify( ), 808
Object.wait( ), 808
ObjectInput interface, 595
methods defined by, table of, 595
ObjectInputStream class, 287, 595
methods defined by, table of, 596
ObjectOutput interface, 593
methods defined by, table of, 594
ObjectOutputStream class, 287, 593
methods defined by, table of, 594
Observable class, 518–522
methods, table of, 519
Observer interface, 518, 519–522
Octals, 40
as character values, 41
of( ), 458
offer( ), 446, 456
offerFirst( ), 446, 447, 452
offerLast( ), 446, 447, 452
offsetByCodePoints( ), 376, 383
openConnection( ), 607, 608, 610
Operator(s)
arithmetic, 57–62
assignment.SeeAssignment operator(s)
bitwise, 62–70
Boolean logical, 71–73
parentheses and, 74–75
precedence, table of, 75
relational, 39, 70–71
ternary, 73–74
OR operator (|)
bitwise, 62, 63, 64–65
Boolean, 71, 72
Index 1015