! operator 142
* operator 142
*= operator 143
+ operator 142
, operator 147
/ operator 142
/= operator 143
<%! tag> 712
<%= tag> 712
<> operator 601
< operator> 601
== operator 142
=> operator 142
> operator 601
>= operator 601
>> operator 144
>> operator 142
| operator 143
~ operator 142
1.5, see JDK 1.5
16-bit
ASCII, String, and binary 400
character output 403
streams, why not use 406
UCS transformation format 456
4-layer TCP/IP model 645
5K contest 756
64-bit compatible 45
7-layer ISO model 644
8-bit
ASCII, String, and binary 400
outputstream classes and methods 399
outputstreams 398
abstract 177
interface methods 230
overriding, forcing on 177
abstract classes 234
Abstract Factory pattern 312
accept method 666
interfaces 230
overview 103
syntax 104
Acord 732
action listeners
callback interfaces 240
see also listeners
activation record 208
adapter classes
class names 510
event handling 508
example 510
listener adapter class 509
major pitfall 511
Adapter pattern 312
addAll method 345
addresses
comparing String addresses 63
finding IP for machine name 673
INetAddress 674
IP address, determining 642
loopback address 664
pointers, references 28
algorithms
garbage collection 206
scheduling, POSIX 275
threads 269
Turing machine 336
alternating and pattern matching 479
Amazon
web services and REST 774
web services beta kit contents 772
web services overview 759
web services, running 773
web services, using 771
anchors in pattern matching 477, 478
angle brackets
generics and 317
syntax 136
anonymous classes 93
event handling 508
instance initializers 93
ANSI
codesets appendix 787
SQL and 595
Ant 689
Apache
configuration 703
defined 689
deployment 706
servlet reference implementation 688
interfaces 230
networking 648
Object class 57
overview of
POSIX threads standard 267
reading Java API 79
ServerSocket 666
Apple’s Zen Garden 132
Applet 559
applets
astronomy applet 575
containers 559
life cycle 526
Light Relief 199
limitations 435
methods 560
Powers of 10 tutorial 200
application layer 645
application libraries, see libraries
application programmer interface, see API
Application Service Provision 687
applications in jar files 102
ArgumentIndex 396
arguments
generic type parameters 325
var-args 97
variable arity 98
arithmetic shift operator 144
arrays
arrays of arrays, instantiating in steps 193
arrays of, declaring 191
arrays of, description 190
brackets 194
bulk transfer from buffer to 448
cloning 236
compatibility 188
creating 187
description 185
duplicating 189
I/O output destination 399
indexes, when checked 186
indexing and 64-bit Java 195
initializing 189
iterating over 192
length of array 187
multi-dimensional 190
object type 185
output 400
size 187
terminology in other languages 191
values method and enumeration 123
ASCII
ASCII, String, and binary 400
character sets 454
codesets appendix 787
input 414
MIME 702
printable output 402
required encodings 456
XML and 731
ASP overview 685
assert
caveat 223
complete example 222
overview 221
two key steps 221
assignment
operator precedence 143
operators 153
associativity 148
astronomy applet 575
databases, defined 583
defined 591
overview 55
performance 56
primitives and variable arity 98
AVG function 602
Canvas component 534
Container class 553
description 500
inheritance example 162
native library behavior 520
Axis 763
back references and pattern matching 476
beans
example in JSP 715
bible code 546
BigDecimal class 155, 392, 490
big-endian storage 454
BigInteger class 155, 392, 490
binary
ASCII, String, and binary 400
byte-swapping binary data 459
input 414
output to 401
bind method 666
binding, late 174
bitwise shift 142
blackout and race conditions 290
blank final variable 118
blocked server I/O 443
blocking I/O workaround 443
blocks
statements, blocks of 69
synchronized 292
BNF and generics 323
book website 14
boolean
defined 41
description 43
BorderLayout 564
Bosiak, Jon 731
bounds
generic bounds that mention generic type 331
generic parameter bounds 333
type parameters 330
wildcards 364
wildcards, lower bounds on 365
BoxLayout 565
braces 136
brackets 194
branches
break, omitting at end 72
default branch 72
break
continue 76
enumeration 124
omitting at end of branch 72
statement syntax 76
browsers
defined 684
HTTP, retrieving pages 671
protocols 693
BufferedInputStream class 420
BufferedOutputStream class 408
BufferedReader class 414
BufferedWriter class 408
buffers
bulk transfer from 448
creating 445
current position 444
memory 441
memory mapping 451
methods 446
overview 441
reading a file 446
view buffers 447
business-to-business XML processes 732
buttons
JButton 531
JButtonGroup 535
JRadioButton 535
radio buttons 535
byte
defined 41
description 48
byte array input source 415
byte-swapping binary data 459
C++ 173
CAFEBABE 420
calculations
operator descriptions 143
precision 149
numbers for months 486
utilities 483
call chain 211
callbacks
callback routine 501
interface callbacks 239
Canvas
corresponding Swing component 534
functionality 534
Carnivore FBI program 667
case 72
Class class 180
classes, rules 170
generics 320
note on 47
operator 153
operator precedence 142
overflow 154
subclasses and superclasses 169
widening and narrowing 152
see also conversion
Catalina 689
catching
catch clause 211
defined 211
exceptions 214
exceptions within throwing method 214
categories
event handling 507
lightweight controls 523
certification exam
Java exams 313
superclass/subclass compatibility 171
CGI
client/server and 687
servlets versus 687
channels
close-on-interrupt 443
file channel 444
overview 441
reading a file 446
transfer data methods 444
when to use 441
char
defined 41
description 43
Filter to replace 407
Unicode 45
character escape sequences 45
character sets 454
encoders and decoders 440
encodings 459
results 458
summary 460
using specific 457
checkboxes 533
CipherOutputStream 408
class data sharing 19
classes
accessing member from within versus without 31
casting rules 170
Class class 179
Collection 320
constant-specific class bodies 130
declaring with generic type parameters 322
Double 241
exception hierarchy 213
File class 387
finding 101
forward referencing 138
grouping in packages 23
HashSet 353
jar files, putting in 101
Math class 195
methods, syntax 95
Object 57
objects and 26
packaging 99
qualifying names 137
static 113
String 60
TreeSet 356
wrapping output classes 406
classpath
jar files 102
Java installation 782
client/server
client sockets 655
Java Studio Creator 610
Mckoi JDBC driver mode 613
server sockets 666
TCP/IP model 650
web programming 687
clock program
compiling and running 20
main code for 32
Cloneable interface 235
arrays 236
Cloneable interface 235
common pitfall 237
defined 235
protected and 237
shallow versus deep 236
close method 405
code
commenting out 78
timing 493
codesets appendix 787
COFFEEPOT property 148
ColdFusion overview 685
Collection classes 320
addAll method 345
Collection summary 368
Collections helper class 357
constructors 346
foreach 347
HashMap class 372
iterating and exceptions 349
list classes 350
lists 342
maps 342
methods 345
objects, declaring 345
queues 342
removeAll method 345
retain method 345
sets 342
shuffling elements of 362
TreeMap class 375
TreeSet class 356
Collections helper class 357
colliding data field names 167
columns, defined 583
comma operator 147
command line output 393
Command pattern 312
comments
commenting out code 78
conventions 78
javadoc 78
javadoc tool overview 80
XML 726
commercial databases 611
changes in JDK 1.5 233
complete example 232
generic parameters 233
type argument 233
with generics 327
without generics 327
Comparator interface 359
compare method 361
compareTo method 232, 233, 361
incorrect optimization 360
intern method 63
objects 59
SQL comparison operators 601
Strings 63
compatibility
arrays 188
Tomcat and servlet/JSP 689
XML 731
compile time
generics error reporting 321
literals 42
compiling
clock program example 20
servlets 700
Component class 554
components
debugging 561
debugging lightweight 545
displaying 526
heavyweight and lightweight 522
Swing component descriptions 529
Swing list 543
toolkit 571
see also GUI
composite types
defined 22
primitive types versus 22
concatenation 61
conditional operator precedence 143
conditional statements 69
configuration
Tomcat 703
Tomcat paths 705
connecting
connection methods 619
Connection object and transactions 625
database connection 617
databases 615
networking connection classes 649
URLConnection 673
constants
constant-specific class bodies 130
enumeration constants 121
final keyword 117
constructors
collection constructors 346
constructor calling another 91
default no-arg 90
enumeration 128
inheritance 92
inheritance and 174
no-arg, when not to use 90
overview 89
syntax 90
container classes, see collections
containers
AWT containers 553
layout 561
overview 552
servlet, defined 684
Swing containers 554
Tomcat 689
content length, tracking in servlets 703
context-sensitive parsing 122
continue
break statement 76
dowhile statement 75
controls
see also GUI
casting 47
conversion specifiers 395
overflow 154
widening and narrowing 152
see also casting
cookies
defined 690
description 710
arrays 189
cloning 235
COUNT function 602
covariant return types 238, 325
CREATE
defined 596
example 597
curly braces 136
cursors
appearance 572
icons 572
result sets 604
data
instance data versus static data 114
moving between threads 305
static 114
validation, DTD 726
data race conditions 291
benefits 21
primitives versus 22
procedural language data types 21
SQL 598
see also attributes, variables
commercial 611
connecting to 615
connection 617
connection methods 619
defined 582
design 584
drivers
defined 615
loading 616
entity integrity 587
foreign keys 586
Java bean in JSP, example 715
Java Studio Creator 610
JDBC
complete example 627
overview 610
mathematical concepts 584
Mckoi
downloading and installing 592
jar files, setting up 593
query tool 594
running 613
running sample code 613
noncommercial 612
normal forms 590
ODBC 615
primary keys 586
reducing duplicated data 585
referential integrity 586
relational
overview 582
terminology 591
relationships
many-to-many 588
one-to-many 587
one-to-one 587
result set metadata 630
SQL
data types 598
executing commands on databases 619
execution methods 620
functions 602
overview 595
statement categories 596
tables
adding 590
defined 583
terminology 583
transaction integrity 587
transactions 625
datagrams 640
datagram sockets 645
diagram 641
datalink layer 645
DataOutputStream class 401
DateFormat class 484
dates
Date class 483
month numbers 486
see also Calendar
deadlock 304
debugging
GUI 561
lightweight components 545
servlets 707
sockets 666
telnet 667
threads bug 303
decoders, character set 440
deep clone 236
default no-arg constructor 90
delayed binding 174
delegation-based model 501
DELETE
defined 596
example 605
demons
sendmail 657
threads 280
deploying servlets 706
deprecated
interfaces 485
thread methods 283
description 159
descriptors
defined 390
standard in, out, err 391
design patterns
1.1 event handling 513
Factory summary 753
designing databases 584
destructor 95
Digital Signature Algorithm interfaces 490
dippy birds 286
directories for Java classpath 102
disk
freeing disk space 14
objects, writing to 436
dispose method 207
DNS servers 648
Document Type Definition, see DTD
documentation 608
doGet 697
DOM
defined 733
example 737
nodes 741
SAX versus 745
using 736
domains 583
doPost 697
double
defined 41
largest double precision number 51
overflow 154
range of values 50
strictfp 198
Double class 241
double-byte characters 411
double-clickable jar files 102
dowhile 75
downloading
Amazon web services beta kit 771
Google web services beta kit 764
Java 781
Mckoi database 592
Tomcat 691
DriverManager 617
drivers
defined 615
DriverManager 617
loading 616
DROP
defined 596
example 606
business-to-business processes 732
Shakespeare’s plays 729
syntax 727
dumping a file to hexadecimal 418
duplicating
arrays 189
DVDs
illegal prime number 424
illegal tshirt 463
EDSAC 335
eggs, standard size and enumeration 128
elements, XML 725
debugging 667
embedded mode 613
empty bodies and listener adapter classes 509
encoders, character set 440
encoding, HTTP 696
encodings
character sets 459
required 456
endian, big and little 454
end-of-line characters 386
Englebart, Doug 516
ENIAC 334
Enterprise Edition
J2EE features 339
overview 14
entities 734
entity integrity 587
Entscheidungsproblem 334
enumeration
1.5, how done before 112
break statements 124
complicated types 127
constants 121
constant-specific class bodies 130
constructors 128
egg example 128
enumerated type benefits 119
final ints, drawbacks 119
import static 126
predefined members 129
qualified name 125
servlets 699
statement updates for 121
static and final 112
switch statement 124
type name, importing 125
values method and 123
why enumerate types 119
enumerations 111
environment variables and properties 493
EOFException 418
equality
comparing objects 59
see also comparing
errors
assertion error 222
detecting early, generics 320
generics 326
window, JOptionPane 537
escape characters and pattern matching 474
escape sequences 45
arrays 141
expressions 139
operands 141
evaluation and conversions 152
anonymous classes 508
interface callbacks 239
1.1 design pattern 513
1.1 event object hierarchy 504
1.1 event passing 503
actions 500
categories 507
events 507
events, defined 501
framework for all 507
interface for each Swing component 543
interfaces 507
Java event model 501
listener adapter class 509
overview 501
registering several listeners 513
slimmer code 508
summary 512
threads 502
event-driven programming 501
events
1.1, event object hierarchy 504
1.1, how passed in 503
defined 501
Swing events list 543
exceptions
catching within throwing method 214
causing 212
class hierarchy 213
defined 211
fancy stuff 219
how methods declare 218
how propagates if not caught in throwing method 217
I/O 417
iterating through collections 349
method that threw 220
overview 210
related 216
servlets 703
summary 221
terminology 211
thrown, what happens 211
user-defined 213
executable application in a jar file 102
exercises
advanced I/O 460
advanced threads 312
classes and objects 38
collections 377
constructors and visibility 107
containers and layout 574
event handling 515
I/O 423
interfaces 242
JDBC 631
networking 679
polymorphism and inheritance 183
regular expressions 496
servlets and JSP 717
SQL 607
statements 83
Swing 546
XML 755
expression statements 70
expressions
conversions 152
evaluating 139
precision 149
regular expressions 470
syntax 139
extend, defined 160
factoring out, defined 585
Factory design pattern 738, 749, 753
fall-through 72
FBI Carnivore program 667
fields
access modifiers 104
forward referencing 138
file channels 444
file descriptors
defined 390
standard in, out, err 391
files
example of output to 401
I/O output destination 399
input source 415
random access file 430
FilterInputStream class 421
FilterOutputStream class 408
FilterReader class 414
filters 407
FilterWriter class 406
final 176
blank final variable 118
description 117
interface data fields 230
ints, using to enumerate 119
overriding, forcing off 175
finalizers
description 205
JLS citation 207
finally
catching exceptions 214
cleaning up with, note 216
purpose in exceptions 215
Flags 396
float
defined 41
overflow 154
range of values 52
floating-point
division operator 143
double 50
extension 151
float 52
inaccuracy issues 150
overflow 154
significant figures 149
types overview 49
flow of control
assert statement 78
dowhile statement 75
exceptions 211
throw statement 78
transfer of control statements 77
FlowLayout 562
flush after use 405
footprint reduction 19
for
arrays, iterating over 192
enumeration and 121
statement syntax 73
foreach
collections, iterating through 347
enumeration 122
foreign keys 586
Formatter class 394
formatting
format specifiers 396
string output 436
forms
doGet and doPost 697
example 704
headers 696
normal form 590
POST and GET 695
servlets and 694
forward referencing names 138
fragmentation 204
frames 561
frameworks
event handling framework 507
Java Collection Framework 341
logging 384
thread pools 310
FTP 640
functions, SQL 602
Furby 156
garbage collection 204
algorithms 206
costs and benefits 205
finalizers 205
fragmentation 204
weak references 207
generic parameters 362
arguments for generic type parameters 325
arguments versus parameters 318
bounds 330
clone method and 325
Comparable interface with 327
Comparable interface without 327
declaring class with generic type parameters 322
generic class example 334
generic interface example 334
generic interfaces 326
generic method example 334
generic methods 362
generic type parameters 322
generic type restrictions 328
instantiating object 325
invoking methods on objects 326
methods, invoking on objects 326
parameter bounds 333
parameter bounds that mention generic type 331
problem solved by 319
purpose 321
table example 324
terminology 334
three parts 322
using outside Collection classes 322
GET
defined 690
HTTP GET command 669
POST and 695
GIF
image I/O 384
importing images into program 558
JFrame 557
googlewhacking 778
web services beta kit contents 764
web services overview 759
web services, running 768
web services, using 764
WSDL file 766
goto 68
grammar, defined 8
greater than operator, precedence 142
GregorianCalendar class 484, 485, 486
grep program for pattern matching 482
GridLayout 564
groups and pattern matching 476
cursor icons 572
event handling actions 500
event handling overview 501
functionality, four basic areas 499
heavyweight and lightweight components 522
JFC overview 520
JFC terminology 521
JFrame, displaying components 526
layout managers 562
pluggable look and feel 549
printing screen 571
Swing component descriptions 529
see also AWT, Swing, event handling
GUI event handlers 239
GZIPInputStream class 421
GZIPOutputStream class 408
handlers 211
event handlers and interface callbacks 239
see also event handlers
Hank the Angry, Drunken Dwarf 717
Hard Luck Hard Disk 83
hardware for networking 646
has a 166
hash tables
defined 371
hashcodes 59
HashSet class 346
collections and lists 351
using 353
Hatless Atlas song 65
header files
use in other languages 23
headers
HTTP 696
servlet request methods 699
heap
default size 202
description 202
garbage collection 202
storage lifetime 203
heavyweight 522
Hello World 783
hexadecimal 418
Hindi output 401
HotSpot 19
HTML
5K contest 756
POST and GET 695
servlets, invoking with 694
XML versus 722
XML’s advantages over 722, 724
HTTP
1.1 enhancements 702
browsing 671
defined 690
GET command 669
headers 696
mapped I/O HTTP server 677
multithreaded HTTP server 675
POST and GET 695
requests and responses 695
response syntax 696
servlet requests 698
servlets and 693
version comparison 702
hubs 647
16-bit character output 403
ASCII printable output 402
basic reader methods 411
binary output 401
blocked server 443
buffers 441
channels 441
design philosophy 385
exceptions 417
File class 387
file locking 452
formatted string output 436
input 410
input methods 415
inputstream wrappers 420
interrupting 283
java.io package 382
key File class members 388
memory-mapped 449
Multics 450
multiplexed non-blocking 441
non-blocking 440
number of classes 382
output 397
output destinations 399
packages 384
piped I/O for threads 305
platform differences 386
practical output examples 400
printstreams 391
problems 382
processes, limitations on running 435
program output, reading 432
random access file 430
reader wrappers 413
reading file and dumping to hexadecimal 418
threads, stopping 283
wrappers 383
wrapping additional output classes 406
writer wrappers 406
XML support class 439
zip files, outputting 409
IBM Linux watch 108
icons for cursors 572
identifiers
defined 137
legal Java identifiers 138
names versus identifiers 137
overview 137
identity conversions 152
IDEs 18
if statement syntax 71
illegal
prime number 424
tshirts 461
images, importing into program 558
IMAP 640
immutability and final keyword 117
immutability of Strings 61, 63, 64
implicit fall-through 72
importing
import static syntax 126
type name, enumeration 125
IN operator 601
indexes
array indexes, when checked 186
arrays 195
INetAddress 674
inheritance
benefits of 165
casting 169
casting rules 170
constructors 92
constructors and 174
data field name collision 167
description 159
example of real-world 160
Java example 162
multiple inheritance 167
Object and polymorphism 174
summary 167
superclass object acting as subclass 169
toString method 175
initializing arrays 189
inner classes and event handlers 508
basic methods 415
description 410
double-byte characters 411
InputStream wrappers 420
problem 412
reader methods, basic 411
reader wrappers 413
see also I/O
InputStream class 415
InputStreamReader class 421
inputstreams
piped I/O 305
TCP/IP diagram 650
wrappers 420
INSERT
defined 596
example 598
insolvent pachyderms 778
installing
Mckoi database 592
Tomcat 691
instance initializers 93
instance methods and enumeration variables 129
instanceof 145
instead of switch 743
operator 145
instantiating
arrays 187
constructors 89
objects, constructors 89
int
defined 41
description 46
integrity
defined 591
entity 587
referential 586
transaction 587
interface, see GUI
interfaces
abstract classes versus 234
callbacks 239
Comparable 232
deprecated 485
event handling 507
generic interfaces 326
generic parameter bounds 333
Java Native Interface 495
JDBC, interfaces versus classes 618
locks and memory mapping 440
member behavior 230
overview 227
problem solved by 228
summary 231
Swing event handler interfaces 543
intern method 63
Internet Protocol, see IP
interpreter
performance boosts 19
program for Java 18
interrupting
I/O 283
interrupt method 304
threads 303
introspection 180
ints
enumeration and final int drawbacks 119
overflow 154
IP 640
address, determining 642
current connections, showing 668
defined 650
finding address for machine name 673
INetAddress 674
loopbackaddress 664
ports and 652
protocols built on 645
version 4 versus version 6 646
ipconfig 642
is a 166
ISO
codesets appendix 787
ISO-8859-1 456
seven-layer model 644
ISPs, blocking 633
iterating
collections 347
collections, exceptions 349
Iterator interface 347
J2EE
features 339
overview 14
J2ME overview 12
J2SE overview 13
Jakarta 690
JApplet
example 526
subclass of Panel 559
jar files
applications, storing in 102
classpath 102
creating 101
double-clickable 102
executable application in 102
Google web services 765
location JDK looks for 102
Mckoi 629
Mckoi, setting up 593
servlet deployment 706
Jasper 690
classpath, installation 782
clock program, main code for 32
downloading 781
early names for 378
event model 501
J2EE overview 14
J2ME overview 12
J2SE overview 13
JRE overview 18
JVM overview 18
language overview 8
Microsoft and 7
objects, introduction to 17
operator descriptions 143
operator precedence 142
overview 3
package list 11
portability benefits 4
portability, importance 5
running program 18
strongly typed, defined 42
see also JDK
Java Foundation Classes, see JFC
Java Native Interface 495
Java Studio Creator 610
javac 18
javadoc 78
comments 78
tool, overview 80
using 82
JAXB 733
JAXM 733
JButton
description 530
example 527
internationalization 531
JButtonGroup 535
JCheckBox 533
JComponent
actions 524
component descriptions 529
controls 525
debugging components 545
description 524
features provided 522
JFrame, arranging 527
overview 522
JContentPane 556
JDBC
additional information 631
complete example 627
drivers, loading 616
interfaces versus classes 618
prepared statements 626
SQL connection methods 619
SQL execution methods 620
stored procedures 627
transactions 625
transactions, batching 624
versions 614
JDiskReport 14
classes, finding 101
features in each release xix
see also Java
JDK 1.1
event handling pattern 513
event object hierarchy 504
event passing 503
arrays, iterating over 192
autoboxing and unboxing 55
class data sharing 19
concurrent package 310
deprecated thread methods 283
ellipsis token 136
enum keyword 136
enumerations 111
footprint reduction 19
java.nio I/O package 440
new features summary
StringBuilder 64
variable arity 97
JEditorPane
description 541
JTabbedPane and 539
advantages 521
overview 520
terminology 521
JFrame
containers 557
displaying components 526
JGlassPane 556
JLabel 529
JLayeredPane 556
JMenuBar 556
jobs and Java 6
JOptionPane 537
JPanel 556
alternative using JLabel 534
description 534
JTabbedPane and 539
KeyListener 535
using 558
JPG 558
JRE overview 18
JRootPane 556
JScrollPane 538
JServ 690
JSP
container, Tomcat 689
example 714
executing 713
Java beans example 715
servlets versus 710
Struts 714
syntax 711
tag libraries 716
tags 712
terminology 689
JTabbedPane 539
description 539
JTextField 532
JToolTip 531
Just in Time compiling 19
Just Java website 14
JVM overview 18
JWindow 560
Kenobi, Obi-Wan 545
KeyAdapter 511
keyboard output 393
KeyListener 535
keys 586
keywords 136
enum, new 112
Java 136
Kleene star 468
Knuth, Donald 80
labels, JLabel 529
definition of programming language 7
see also object orientation 21
late binding 174
layers
ISO seven-layer model 644
TCP/IP four-layer model 645
layout
combining layout managers 566
containers 561
grid layout 564
layout managers
BorderLayout 564
BoxLayout 565
combining 566
FlowLayout 562
GridLayout 564
layout managers overview 562
left bitwise shift 142
length 186
length of arrays 187
less than operator, precedence 142
grouping classes 23
Java libraries list 11
JAXP 735
JSP tag libraries 716
overview of libraries 9
run-time library overview 10
life cycle for servlet 708
lifetime for object on the heap 203
Light Relief
500 Mile Limit on Email 680
Apples and Crays 497
applets 198
Computable Numbers and the Entscheidungsproblem 334
Early Names for Java 378
Furby’s Brain Transplant 156
googlewhacking 778
Hatless Atlas 65
Haunted Zen Garden of Apple 132
Illegal Prime Number 424
Java Certification 313
Java-Powered Toaster 242
JDiskReport 14
MiniScribe, the Hard Luck Hard Disk 83
Napster and Limewire 38
NASA Spirit Rover 224
Nerd Detection System 184
Reading the Docs 608
Sky View Cafe astronomy applet 574
Spam 632
The Bible Code 546
The Illegal Tshirt 461
The Motion Sensor Solution (Dippy Birds) 285
The Mouse That Roared 515
Using Java to Stuff an Online Poll 717
View Source on Kevin’s Life 756
lightweight
components, debugging 545
controls list 523
defined 522
LIKE operator 601
Limewire 38
LineNumberInputStream class 421
LineNumberReader class 414
link layer 645
Linnaean taxonomy 160
Linux
portability of Java 4
watch 108
list of items 185
adapter class pitfall 511
callback interfaces 240
example 509
listener adapter class 509
pluggable look and feel 551
registering several for same event 513
top-level class, making into 508
lists
collections 342
LinkedList class 349
List class 349
maps and 342
sorting for collections 359
literals
boolean literals 43
byte literals (none) 48
char literals 44
defined 42
int literals 46
long literals 47
short literals (none) 49
String literals 60
Strings, immutable 61
little-endian storage 455
local thread storage 308
locks
deadlock 304
file locking 452
read/write 291
logging servlets 703
long
defined 41
description 46
loopback address 664
loops
break statement 76
continue statements 75
dowhile statement 75
for loop and enumeration 123
for statement 74
looping statement syntax 73
mutually exclusive threads 298
variable, declaring 74
Macintosh
portability of Java 4
web services 777
500 mile limit 680
MIME 702
sending 657
main method
example 32
static 116
many-to-many relationships 588
Map interface
HashMap 372
TreeMap 375
mapped I/O HTTP server 677
maps
collections 342
defined 343
Maps interface 369
mark and sweep 206
Matcher class 469
MAX function 602
Mckoi
class path 629
downloading and installing 592
jar files 629
jar files, setting up 593
query tool 594
running 613
running sample code 613
memory management 202
finalizers 205
heap 202
leaks 203
memory no longer in use, indicating 204
reclaiming objects 94
reference types and 28
stack 208
weak references 207
memory mapping interface 440
metacharacters and pattern matching 474
metadata
File class 387
File class members 388
result sets 630
metawords in pattern matching 480
methods
access modifiers 104
activation record 208
catching exception within throwing method 214
exceptions, declaring 218
File class 388
finding method that threw exception 220
forward referencing 138
generic methods 362
generic, example 334
grouping in packages 23
I/O metadata 388
instance methods and enumeration variables 129
interfaces 230
invoking static method through instance variable 116
overriding 172
overview 95
parameterizing 366
reference variables, passing parameters to methods 96
servlet request methods 699
servlet response methods 700
stack 208
static methods 116
static, common pitfall 117
Swing interface methods 543
variable-arity 97
see also generic methods
MFC memory leaks 203
Micro Edition overview 12
MicroQuill 203
Microsoft
Java and 7
memory leaks 203
OpenOffice.org office suite competitor 6
MIME 702
MIN function 602
MiniScribe 83
modal Window 560
monitors and threads 291
months
numbers for 486
see also Calendar
motion sensors 285
mouse inventor 515
Multics 450
Multics and wait/notify 297
multi-dimensional arrays 190
multidimensional arrays 190
multiple inheritance 167
interfaces 229
multiplexed non-blocking server I/O 441
multithreading, see threads
mutually exclusive threads 287
communicating 295
example 288
over a method 294
over block of statements 293
over entire class 292
MVC
overview 552
Struts 715
naming
data field collision 167
early names for Java 378
forward referencing 138
names versus identifiers 137
package names and namespaces 100
package names, unique 100
package naming rules 99
qualifying 137
subclasses and data field names 167
XML namespaces 729
Napster 38
narrowing conversion 152
NASA Spirit Rover 224
Native Interface 495
native library behavior in AWT 520
negation and pattern matching 479
nerd detection system 184
nested classes 104
nesting 166
netstat 668
network layer 645
networking
additional information 679
hardware 646
IP and UDP diagram 641
ISO seven-layer model 644
library 648
overview 639
TCP/IP four-layer model 645
Windows 657
see also sockets, packets, protocols
new features in 1.5, see JDK 1.5
new keyword 90
no-arg constructor 90
nodes and DOM 741
noncommercial databases 612
non-polling I/O 442
normal form 590
null
databases 587
null reference 27
null bodies and listener adapter class 509
numbers
random 492
see also Math class
Object class
equals method 59
inheriting from 174
overview 57
classes, defined 20
inheritance 159
inheritance and constructors 92
inheritance example 162
polymorphism 159
terminology 160
object references 96
ObjectOutputStream class 408
objects
arrays, similarities 186
arrays, similarities and differences 186
autoboxing 55
code example, simple 30
collection objects, declaring 345
comparing value 59
defined 26
heap 202
instantiating
constructors 89
steps that occur 93
instantiating for generics 325
introduction to 17
memory management 94
no longer in use, indicating 204
object wrapper classes for primitive types 54
pass by value versus pass by reference 96
primitives versus 27
reference to an object versus 29
static 113
storage lifetime 203
wrappers for primitives 53
writing objects to sockets 437
writing to disk 436
Observer pattern 312
octal escape sequences 45
ODBC 615
one-to-many relationships 587
one-to-one relationships 587
OOP, see object orientation
OpenOffice.org office suite 6
operand evaluation 141
operating cycle of servlets 708
operating systems
I/O differences among 386
portability, benefits 4
portability, importance 5
operators
cast and assignment 153
description 140
Java operator descriptions 143
precedence 142
SQL comparison 601
optimization
incorrect 360
servlets 709
order of evaluation
operands 140
see also evaluating
arrays 400
destination options 399
practical examples 400
readers versus outputstreams 397
reading program output 432
Width 396
wrapping additional output classes 406
zip files 409
see also I/O
OutputStream class 408
outputstreams
16-bit characters 398
binary output 401
example 400
piped I/O 305
readers versus 397
servlets 703
TCP/IP diagram 650
wrappers 408
OutputStreamWriter class 408
overflow
BigInteger 155
casting 154
overloading 171
description 171
methods, syntax 96
overriding versus 174
overriding
covariant return types 238
forcing off with final 175
forcing on with abstract 177
methods 172
overloading versus 174
packages
classpath 102
defined 99
finding classes 101
grouping classes in 23
I/O packages 384
Java package list 11
naming rules 99
packaging classes 99
unique names 100
visibility 98
routers and 647
UPD 649
watching 667
p-and-v semaphores 291
parameterized type 334
parameters
generic methods 366
generic parameter bounds 333
generic type 322
pass by value versus pass by reference 96
passed by reference 96
passed by value 96
primitives and parameter-passing 96
reference variables, passing parameters to methods 96
wildcard parameters 362
parentheses 136
parsers
DOM 736
SAX 744
SAX versus DOM 745
pass by reference 96
pass by value 96
Pattern class 469
pattern matching
alternating 479
anchors 477
anything but feature 473
anything except this word feature 479
capturing groups 476
cautions 469
classes 469
escape characters 474
grep program 482
metawords 480
methods 470
patterns, forming 470
quantifiers 475
ranges 473
sample program 472
single-character metacharacters 474
three main steps 468
using 469
when used 468
word negation 479
patterns
design pattern summary 753
design patterns overview 312
Factory design pattern 749
pattern matching and I/O 440
PatternSyntaxException 469
performance
autoboxing 56
batching SQL statements and transactions 624
interpreter performance boosts 19
servlets 709
strictfp 198
StringBuilder 64
petservlet
petform.html 704
results 705
pipes
example of output to 401
I/O output destination 399
input source 415
piped I/O for threads 305
pitfall 305
pluggable look and feel
illustration 551
overview 549
pointers 28
polls, rigging results 717
description 171
late binding 174
Object, inheriting from 174
overloading 171
overloading versus overriding 174
overriding 172
parametric 319
populating tables with INSERT 599
portability
benefits 4
I/O 386
I/O design philosophy 385
importance 5
jobs, effect on 6
OpenOffice.org 6
pluggable look and feel 549
web based software 686
XML 731
ports
defined 652
firewalls and 652
predefined 652
POSIX
scheduling algorithm 275
thread standard 267
POST
defined 690
GET and 695
post-increment operator 142, 143
Powers of 10 tutorial 200
powers of two table 785
precedence 142
associativity versus 148
operator precedence 142
operators 142
precision
calculation accuracy 149
calculations 149
floating-point arguments 396
pre-increment operator 142, 143
prepared statements
description 606
using 626
primary key 586
prime numbers
example program finding 281
illegal 424
primitives
autoboxing 55
boolean, description 43
byte, description 48
char, description 43
composite types versus 22
data types versus 22
defined 21
descriptions 41
int, description 46
long, description 46
object wrapper classes for primitive types 54
object wrappers 53
objects versus 27
short, description 49
printf
method 394
variable-arity of methods 97
printing screen 571
println 670
PrintStream class 402
printstreams 391
PrintWriter class 403
priority 275
private
protected versus 106
procedural language data types 21
programming language, see languages
properties
environment variables equivalent 493
predefined 494
processing 494
protected
access modifier rationale 106
access modifiers 105
cloning and 237
defined 237
JLS citation 239
private versus 106
servlet request and response 698
HTTP and web components 693
IP, built on 645
remote and println 670
socket 663
SPAM, reducing 636
Trusted Internet Protocol 636
provisioning 687
proxy servers 648
public
interface methods and fields 230
punctuation
defined 136
operators 140
PushbackInputStream class 421
PushBackReader class 414
quantifiers and pattern matching 475
queries
Mckoi query tool 594
SELECT example 599
SELECT result sets 603
SELECT statement 596
speeding up 624
SQL executeQuery method 620
SQL subqueries 602
queues
collections 342
race conditions
avoiding 291
blackout 290
defined 289
radians, converting to degrees 196
raising 211
Random Access File class 430
Random class 492
ranges and pattern matching 473
read/write locks 291
readers
basic methods 411
outputstreams versus 397
reader classes 397
reader classes for input 411
reader wrappers 413
reading from System.in 391
records
DELETE and DROP 596
deleting 605
DROP 596
UPDATE statement 596
updating 605
reference counting 206
reference implementation, servlet 688
reference types
arrays 185
defined 27
key points 22
string comparison 63
why used 28
reference variables
passing parameters to methods 96
tree data structures 29
why used 28
references
back references and pattern matching 476
forward-referencing names 138
objects versus reference to an object 29
pass by value versus pass by reference 96
pointers, addresses 28
references types
memory management and 28
referential integrity 586
regular expressions
pattern matching 470
properties 493
related threads 280
relational databases 581
defined 582
many-to-many relationships 588
mathematical concepts 584
see databases, relational
tables 582
relations 583
relationships 587
reliability and enumeration constants 121
removeAll method 345
repetition and pattern matching quantifiers 475
requests
HTTP 695
servlet 698
servlet requests, key methods 699
servlets 697
reserved words 136
responses
servlet responses, key methods 700
syntax 696
REST
Amazon web services 774
overview 775
contents 603
metadata 630
SELECT example 601
sorted 604
retain method 345
return statement syntax 77
right bitwise shift 142
Robocode software 110
RosettaNet 732
routers
defined 646
packets and 647
rows 583
rules
generic type parameter bounds 330
googlewhacking 779
XML 725
Runnable interface
creating new thread 270
object, turning into thread 272
Swing threads 528
Thread class 284
using 272
run-time amnesia 328
run-time library
overview 10
source code 62
SAX
defined 733
DOM versus 745
example 746
using 744
Scanner class 391
SCJP 313
screen, printing 571
scrolling 538
searching and web services 770
Searching class 325
second normal form 590
sections of XML documents 728
security
firewalls 648
serializing and 438
web services 772
SELECT
defined 596
example 599
pitfalls 604
result sets 603
selection statements 71
selector-based multiplexing 442
semaphores, p-and-v 291
SequenceInputStream class 421
serializing
objects, making serializable 437
security and 438
writing objects to disk 436
servlet containers
defined 684
Tomcat 689
servlets
CGI versus 687
compiling 700
container, defined 684
debugging 707
deployment 706
development tips 707
dynamic content 684
example 701
example, running 692
exceptions 703
forms and 694
HTML to invoke 694
logging 703
operating cycle 708
outputstreams 703
overview 683
pathnames for executing 705
petservlet results 705
products replaced by 687
reference implementation 688
requests 698
requests and responses 697
requests, key methods 699
responses 699
responses key methods 700
specification location 710
terminology 689
threads 709
tips 703
Tomcat configuration 703
tracking content length 703
web services and 687
why use 686
writing 700
sessions 710
sets
collections 342
HashSet class 353
maps and 342
Set interface, defined 355
see also result sets
shadowing field names 167
Shakespeare DTD 729
shallow clone 236
shift, bitwise 142
short
defined 41
description 49
signed shift operator 144
significant figures
double, largest possible 51
floating-point 49
SimpleDateFormat class 484, 488
SimpleTimeZone class 484
single-character metacharacters 474
Singleton pattern 312
Sky View cafe 575
SmartHeap 203
SNMP 640
SOAP 763
background 642
blocking I/O 443
C/C++ 653
client socket 655
client versus server 645
connections 645
datagram 645
datagram diagram 641
debugging 666
defined 652
diagram 643
I/O output destination 399
input source 415
Java 653
networking classes 648
println and 670
protocols 663
server socket 660
server sockets 666
ServerSocket 666
stock finder 672
stream sockets 645
TCP/IP diagram 650
URLconnection 673
writing objects to 437
sorting
interfaces for collections 359
result sets 604
Sorting class 325
source code of Java run-time library 62
spam
lovely 632
pattern matching 468
preventing 634
Spirit Rover 224
SQL
comparison operators 601
cursor 604
data types 598
executing statements 619
execution methods 620
functions 602
overview 595
prepared statements 606
result sets 603
statement categories 596
statements, batching 624
stored procedures 606
support for SQL types 490
SSEC 335
stack
description 208
diagram 209
servlet stack trace 707
Stack class 489
stack cracking 208
stack frame 208
strack trace, defined 211
threads and 210
Standard Edition overview 13
standard in, out, err 391
start method 271
statements
assert 221
branches 72
break statements 76
common Java statements 67
dowhile statement 75
dowhile statements 75
empty statement ( 69
enumeration, updates for 121
expression statements 70
for statements 73
if statements 71
looping statements 73
organizing 69
overview 68
return statements 77
selection statements 71
SQL statement categories 596
SQL statements, batching 624
switch statements 71
switch’s design flaws 73
transfer of control 77
static
data 114
description 113
import static syntax 126
methods 116
methods, common pitfall 117
mutual exclusion over class static methods 293
threads 293
what you can make static 114
stderr 391
stdin 391
stdout 391
stop and copy 206
storage
big-endian 454
little-endian 455
thread local storage 308
storage lifetime 203
stored procedures
defined 592
description 606
using 627
streams
closing after use 405
input and output streams 397
memory-mapped I/O 449
selecting class for 398
String class
concatenation 61
creating new 61
methods, important 64
toString method 58
StringBuffer 415
Strings
ASCII, String, and binary 400
comparing 63
formatted output 436
I/O output destination 399
intern method 63
StringBuffer 63
StringBuilder 64
strongly typed 42
Struts
finding more information 715
overview 714
casting 169
data field names 167
defined 160
inheritance example 163
interfaces 228
overriding 172
superclass acting as subclass 169
subqueries
examples 603
SQL 602
subtypes
defined 160
see also subclasses
SUM function 602
super
keyword 164
using 166
casting 169
defined 160
superclass acting as subclass 169
supertypes
defined 160
see also superclasses
swapping bytes 459
component descriptions 529
containers 554
debugging lightweight components 545
error message windows 537
event-dispatching thread requirement 528
events list 543
JComponent, description 524
lightweight controls 523
most useful component 538
threads warning 527
threads, Runnable interface 528
switch
break statement 76
design flaws 73
enumeration and 124
instanceof instead of 743
statement syntax 71
switches
defined 646
hubs versus 647
layer 3 646
synchronization
blocks 292
defined 277
events and threads 502
Multics 297
mutual exclusion over block of statements 293
mutual exclusion over method 294
servlets 709
solutions 291
wait/notify 295
syntax
angle brackets 317
arguments versus parameters 95
arrays and brackets 194
arrays of arrays 191
comments 78
constructors 90
CREATE 597
DELETE 605
doGet and doPost 698
DROP 606
DTD 727
exceptions, catching 214
expressions 139
generic methods 366
generics 334
HTTP 696
identifier rules 137
INSERT 598
JSP 711
methods 95
operators 140
overloading methods 96
punctuation 136
SELECT 599
SELECT pitfalls 604
SQL operators 601
statements 69
UPDATE 605
XML 725
XML comments 726
System.in 391
System.out.println 393
tables
CREATE statement 596
creating 597
database, adding to 590
defined 583
DELETE and DROP 596
deleting 605
inserting records 598
tabs
adding tab and component 541
escape sequences 44
JTabbedPane 539
tags
attributes 726
DTD 727
element tags 725
HTML tags 723
JSP 712
JSP tag libraries 716
XML 734
XML tags 724
TCP/IP 640
client/server model 650
diagram 643
four-layer 645
overview 640
Windows 657
Telnet 640
telnet 667
templates, see generics
test-and-set instructions 291
text editors and pattern matching 468
text fields 532
TFTP 640
third normal form 590
Thread class
diagram 271
example 284
non-private members 284
threads 271
API 267
bug 303
categories of thread programming 277
concurrent package 310
creating 270
defined 267
demon 280
deprecated methods 283
diagram 278
event handling and 502
interrupting 303
local storage 308
moving data between 305
Multics 297
mutually exclusive, communicating 295
mutually exclusive, example 288
pipe pitfall 305
piped I/O 305
prime number program 281
race conditions 289
read/write locks 291
reasons to use 269
related 280
Runnable interface 272
Runnable interface and Swing threads 528
running 271
servlets 709
stack allocated for 210
stopping 283
Swing threads warning 527
synchronization solutions 291
synchronized blocks 292
unsynchronized 280
volatile 304
wait/notify 295
XML 753
three-dimensional arrays 190
throwing exceptions 211
time
global timeservers 656
NETP 655
time-sharing 268
time-slicing 275
see also Calendar
TimeZone class 484
timing your code 493
toaster, Java-powered 242
Tomcat
configuration 703
defined 690
deployment 706
downloading 691
installing 691
overview 689
running JSP 713
servlet debugging tips 707
starting and stopping 692
versions 689
tooltips 531
traceroute 647
transactions
batching 624
Connection object 625
transaction integrity 587
transfer of control statements 77
Transmission Control Protocol, see TCP
transport layer 645
trees
DOM parser, example 740
DOM XML parser 737
reference variables 29
reference variables and 29
XML document structure 727
TreeSet class 356
triggers 592
true/false, boolean 43
Trusted Internet Protocol 636
try
after completed 216
exceptions 214
overhead 218
statement example 215
Turing, Alan 335
two, powers of, table 785
two-dimensional arrays 190
type arguments 334
type erasure 328
type name 125
type parameters 334
types
array compatibility 188
composite types 22
conversion 47
covariant return types 238
enumerated type benefits 119
enumerating, why 119
floating-point 49
generic type restrictions 328
generics 320
grouping in packages 23
reference types 27
reference, why used 28
type parameter and bounds 330
see also data types
UDDI
defined 763
overview 775
unboxing, see autoboxing
Unicode
char and 45
operating systems and 45
unrelated threads 278, 279, 280
unsynchronized threads 279, 280
UPDATE
defined 596
example 605
URLs
I/O output destination 399
URLConnection 673
user datagrams 640
user interface, see GUI
UTF 456
utilities
BitSet class 489
calendar and time 483
Properties class 494
Random class 492
Stack class 489
validation, DTD 726
values method
enumeration and 123
predefined members 129
var-args 97
variable-arity 97
casting note 47
data types versus primitives 22
enumeration variables and instance methods 129
pass by value versus pass by reference 96
reference variables, passing parameters to methods 96
see also attributes, data types
Vector class thread bug 303
versions
IP 646
JDBC 614
JDK xix
servlet reference implementation 688
XML 733
view buffers 447
virtual 173
visibility 98
access modifiers 104
keywords 98
protected 237
see also access modifiers
volatile 304
votebot 718
wait method 297
war files 706
warnings and JOptionPane 537
weak references 207
web browsers
defined 684
protocols 693
web components
JSP overview 711
portability 686
servlet and JSP overview 683
terminology 689
web searches 468
web servers 661
defined 684
multithreaded HTTP server 675
protocols 693
web services
Amazon beta kit, downloading 771
coding your own 770
conclusions 777
defined 761
four components 762
Google beta kit, downloading 764
overview 759
problem they solve 761
REST 774
running Amazon web services 773
running Google web services 768
security 772
servlets and 687
terminology 763
writing, steps 763
website for book website 14
well formed XML documents 726
widening and narrowing conversions 152
widgets 521
wildcards
defined 334
generic methods, combining with 367
lower bounds on 365
parameters 362
wildcarding generic parameters 362
Window
containers 560
JComponent overview 522
JFrame example 504
window listener 509
window listeners
example 509
see also listeners
Windows
portability of Java 4
TCP/IP 657
windows
error message, JOptionPane 537
JTabbedPane 539
see also GUI
winipconfig 642
wireless devices 12
word negation in pattern matching 479
wrappers
autoboxing 55
defined 383
InputStream wrappers 420
object wrapper classes for primitive types 54
object wrappers for primitives 53
output classes 406
primitives, why wrap in objects 53
reader wrappers 413
writer wrappers 406
writers
16-bit characters 398
writer classes 397
WSDL
defined 763
Google WSDL 766
overview 775
XML 735
attributes 726
business-to-business processes 732
comments 726
document tree structure 727
DOM, using 736
DTD 726
elements 725
Factory design pattern 749
HTML versus 722
HTML, advantages over 722, 724
information resources 755
Java XML notes 753
JAXP library 735
namespaces 729
origin 731
problem it solves 731
rules 725
SAX versus DOM 745
SAX, using 744
sections 728
Shakespeare DTD 729
support class, I/O 439
tags 734
terminology 733
threads 753
validation 726
well formed documents 726
Zen Garden 132
Zermelo-Frankel set theory 122
zip files 409
ZipOutputStream class 408
3.137.212.124