I/O (input/output)
combining I/O classes, 435–438
creating files with File class, 431–432
File Writer and FileReader classes, 433–435
I/O classes, 429–430
self test answers, 508–520
self test questions, 498–507
StringBuffer and StringBuilder and, 425
two-minute drill, 494–495
working with files and directories, 438–443
identifiers, 4–10
assertions and, 375–376
Java Beans naming standards, 8–10
Java Code Conventions, 6–8
legal, 5
overview, 2–4
two-minute drill, 68
if-else, 317–320
if statements
if-else, 317–320
legal expressions of, 320–322
overview, 316
two-minute drill, 385
if test, 278
immutability, of strings, 412–419
implementation class, 115–121
implements, 120–121
import statements, 11
increment (++) operator, 290–291, 300
inheritance, 86–90
code reuse and, 87–88
example, 86–87
HAS-A relationships, 92–94
IS-A relationships, 90–91
Java refresher, 3
multiple inheritance, 96
polymorphism and, 88–90
serialization and, 452–456
two-minute drill, 153
initialization
arrays, 214–216, 256
for loops, 334
unassigned and uninitialized variables or arrays, 193
initialization blocks, 224–227, 257
inner classes, 636–672
anonymous, flavor one, 647–651
anonymous, flavor two, 651–652
argument-defined anonymous, 652–654
creating inner class instance from outer class instance, 640–642
instantiating, 640
member modifiers applied to, 644
method-local, 644–646
overview, 636–638
regular, 638–639
self test answers, 665–672
self test questions, 659–664
static nested classes, 654–656
syntax, 649
this reference for, 642–643
two-minute drill, 657
insert(), 427, 578–579
instance methods, polymorphism, 98
instance variables
arrays, 196–197
default details of class member, 36–38
in heap memory, 174
primitives, 194
protected details of class member, 34–36
references, 194–196
serialization and, 456
variable declaration and, 51–53
variable scope and, 191
instanceof operator
compiler error, 285–286
overview, 283–285
two-minute drill, 299
instantiation
constructors, 140–141
inner classes, 640
objects, 126–128
static nested classes, 655
threads, 678–680
two-minute drill, 155–157
int, 324
integer literals, 176
interfaces
anonymous inner classes and, 652
in Collections Framework, 537–538
constants, 22–23
declaring, 19–22
extending itself to another interface, 118–119
extends and implements used with, 120–121
functions of nonabstract implementation class, 117
implementing, 115–121
instanceof operator, 284
Java refresher, 3
two-minute drill, 69–70, 155
IS-A relationships
in inheritance, 90–91
instanceof operator and, 283
two-minute drill, 153
ISO 639 Language Code, 466
isolating a reference, garbage collection, 249–250
iteration
continue and, 340–341
for loops and, 333, 335–336
iterators
hasNext(), 560
next(), 560
overview, 331