Preface xxv
Before You Begin xxxviii
1 Introduction to Computers, the Internet and the Web 1
1.1 Introduction 2
1.2 What Is a Computer? 4
1.3 Computer Organization 4
1.4 Early Operating Systems 5
1.5 Personal, Distributed and Client/Server Computing 6
1.6 The Internet and the World Wide Web 6
1.7 Machine Languages, Assembly Languages and High-Level Languages 7
1.8 History of C and C 8
1.9 History of Java 9
1.10 Java Class Libraries 9
1.11 Fortran, COBOL, Pascal and Ada 10
1.12 BASIC, Visual Basic, Visual C , C# and .NET 11
1.13 Typical Java Development Environment 11
1.14 Notes about Java and Java How to Program, 7/e 15
1.15 Test-Driving a Java Application 16
1.16 Software Engineering Case Study: Introduction to Object Technology
and the UML 20
1.17 Web 2.0 25
1.18 Software Technologies 26
1.19 Wrap-Up 29
1.20 Web Resources 29
2 Introduction to Java Applications 37
2.1 Introduction 38
2.2 A First Program in Java: Printing a Line of Text 38
2.3 Modifying Our First Java Program 45
2.4 Displaying Text with printf 48
2.5 Another Java Application: Adding Integers 49
2.6 Memory Concepts 54
2.7 Arithmetic 55
2.8 Decision Making: Equality and Relational Operators 58
2.9 (Optional) Software Engineering Case Study: Examining the
Requirements Document 63
2.10 Wrap-Up 73
3 Introduction to Classes and Objects 84
3.1 Introduction 85
3.2 Classes, Objects, Methods and Instance Variables 85
3.3 Declaring a Class with a Method and Instantiating an Object of a Class 87
3.4 Declaring a Method with a Parameter 91
3.5 Instance Variables, set Methods and get Methods 94
3.6 Primitive Types vs. Reference Types 99
3.7 Initializing Objects with Constructors 100
3.8 Floating-Point Numbers and Type double 103
3.9 (Optional) GUI and Graphics Case Study: Using Dialog Boxes 108
3.10 (Optional) Software Engineering Case Study: Identifying the Classes
in a Requirements Document 111
3.11 Wrap-Up 119
4 Control Statements: Part 1 127
4.1 Introduction 128
4.2 Algorithms 128
4.3 Pseudocode 129
4.4 Control Structures 129
4.5 if Single-Selection Statement 132
4.6 if … else Double-Selection Statement 133
4.7 while Repetition Statement 138
4.8 Formulating Algorithms: Counter-Controlled Repetition 139
4.9 Formulating Algorithms: Sentinel-Controlled Repetition 144
4.10 Formulating Algorithms: Nested Control Statements 152
4.11 Compound Assignment Operators 157
4.12 Increment and Decrement Operators 158
4.13 Primitive Types 161
4.14 (Optional) GUI and Graphics Case Study: Creating Simple Drawings 161
4.15 (Optional) Software Engineering Case Study: Identifying Class Attributes 166
4.16 Wrap-Up 170
5 Control Statements: Part 2 186
5.1 Introduction 187
5.2 Essentials of Counter-Controlled Repetition 187
5.3 for Repetition Statement 189
5.4 Examples Using the for Statement 193
5.5 do … while Repetition Statement 198
5.6 switch Multiple-Selection Statement 199
5.7 break and continue Statements 207
5.8 Logical Operators 209
5.9 Structured Programming Summary 215
5.10 (Optional) GUI and Graphics Case Study: Drawing Rectangles and Ovals 220
5.11 (Optional) Software Engineering Case Study: Identifying Objects' States
and Activities 223
5.12 Wrap-Up 227
6 Methods: A Deeper Look 239
6.1 Introduction 240
6.2 Program Modules in Java 241
6.3 static Methods, static Fields and Class Math 242
6.4 Declaring Methods with Multiple Parameters 245
6.5 Notes on Declaring and Using Methods 249
6.6 Method-Call Stack and Activation Records 250
6.7 Argument Promotion and Casting 251
6.8 Java API Packages 252
6.9 Case Study: Random-Number Generation 254
6.9.1 Generalized Scaling and Shifting of Random Numbers 258
6.9.2 Random-Number Repeatability for Testing and Debugging 259
6.10 Case Study: A Game of Chance (Introducing Enumerations) 260
6.11 Scope of Declarations 264
6.12 Method Overloading 267
6.13 (Optional) GUI and Graphics Case Study: Colors and Filled Shapes 270
6.14 (Optional) Software Engineering Case Study: Identifying Class Operations 273
6.15 Wrap-Up 280
7 Arrays 295
7.1 Introduction 296
7.2 Arrays 296
7.3 Declaring and Creating Arrays 298
7.4 Examples Using Arrays 299
7.5 Case Study: Card Shuffling and Dealing Simulation 308
7.6 Enhanced for Statement 312
7.7 Passing Arrays to Methods 313
7.8 Case Study: Class GradeBook Using an Array to Store Grades 317
7.9 Multidimensional Arrays 322
7.10 Case Study: Class GradeBook Using a Two-Dimensional Array 326
7.11 Variable-Length Argument Lists 332
7.12 Using Command-Line Arguments 333
7.13 (Optional) GUI and Graphics Case Study: Drawing Arcs 335
7.14 (Optional) Software Engineering Case Study: Collaboration
Among Objects 338
7.15 Wrap-Up 346
8 Classes and Objects: A Deeper Look 368
8.1 Introduction 369
8.2 Time Class Case Study 370
8.3 Controlling Access to Members 374
8.4 Referring to the Current Object's Members with the this Reference 375
8.5 Time Class Case Study: Overloaded Constructors 377
8.6 Default and No-Argument Constructors 382
8.7 Notes on Set and Get Methods 383
8.8 Composition 384
8.9 Enumerations 387
8.10 Garbage Collection and Method finalize 390
8.11 static Class Members 391
8.12 static Import 396
8.13 final Instance Variables 397
8.14 Software Reusability 399
8.15 Data Abstraction and Encapsulation 400
8.16 Time Class Case Study: Creating Packages 402
8.17 Package Access 407
8.18 (Optional) GUI and Graphics Case Study: Using Objects with Graphics 409
8.19 (Optional) Software Engineering Case Study: Starting to Program the
Classes of the ATM System 412
8.20 Wrap-Up 418
9 Object-Oriented Programming: Inheritance 427
9.1 Introduction 428
9.2 Superclasses and Subclasses 429
9.3 protected Members 431
9.4 Relationship between Superclasses and Subclasses 432
9.4.1 Creating and Using a CommissionEmployee Class 433
9.4.2 Creating a BasePlusCommissionEmployee Class without
Using Inheritance 437
9.4.3 Creating a CommissionEmployee – BasePlusCommissionEmployee
Inheritance Hierarchy 442
9.4.4 CommissionEmployee – BasePlusCommissionEmployee Inheritance
Hierarchy Using protected Instance Variables 445
9.4.5 CommissionEmployee – BasePlusCommissionEmployee Inheritance
Hierarchy Using private Instance Variables 451
9.5 Constructors in Subclasses 456
9.6 Software Engineering with Inheritance 462
9.7 Object Class 463
9.8 (Optional) Software Engineering Case Study: Displaying Text and
Images Using Labels 465
9.9 Wrap-Up 467
10 Object-Oriented Programming: Polymorphism 471
10.1 Introduction 472
10.2 Polymorphism Examples 474
10.3 Demonstrating Polymorphic Behavior 475
10.4 Abstract Classes and Methods 478
10.5 Case Study: Payroll System Using Polymorphism 480
10.5.1 Creating Abstract Superclass Employee 481
10.5.2 Creating Concrete Subclass SalariedEmployee 484
10.5.3 Creating Concrete Subclass HourlyEmployee 485
10.5.4 Creating Concrete Subclass CommissionEmployee 487
10.5.5 Creating Indirect Concrete Subclass
BasePlusCommissionEmployee 488
10.5.6 Demonstrating Polymorphic Processing, Operator instanceof
and Downcasting 490
10.5.7 Summary of the Allowed Assignments Between Superclass
and Subclass Variables 495
10.6 final Methods and Classes 495
10.7 Case Study: Creating and Using Interfaces 496
10.7.1 Developing a Payable Hierarchy 497
10.7.2 Declaring Interface Payable 498
10.7.3 Creating Class Invoice 499
10.7.4 Modifying Class Employee to Implement Interface Payable 501
10.7.5 Modifying Class SalariedEmployee for Use in the Payable
Hierarchy 503
10.7.6 Using Interface Payable to Process Invoice s and Employee s
Polymorphically 505
10.7.7 Declaring Constants with Interfaces 506
10.7.8 Common Interfaces of the Java API 507
10.8 (Optional) GUI and Graphics Case Study: Drawing with Polymorphism 508
10.9 (Optional) Software Engineering Case Study: Incorporating Inheritance
into the ATM System 510
10.10 Wrap-Up 518
11 GUI Components: Part 1 523
11.1 Introduction 524
11.2 Simple GUI-Based Input/Output with JOptionPane 525
11.3 Overview of Swing Components 528
11.4 Displaying Text and Images in a Window 531
11.5 Text Fields and an Introduction to Event Handling with Nested Classes 536
11.6 Common GUI Event Types and Listener Interfaces 542
11.7 How Event Handling Works 545
11.8 JButton 546
11.9 Buttons That Maintain State 550
11.9.1 JCheckBox 550
11.9.2 JRadioButton 553
11.10 JComboBox and Using an Anonymous Inner Class for Event Handling 556
11.11 JList 560
11.12 Multiple-Selection Lists 562
11.13 Mouse Event Handling 565
11.14 Adapter Classes 570
11.15 JPanel Subclass for Drawing with the Mouse 573
11.16 Key-Event Handling 577
11.17 Layout Managers 580
11.17.1 FlowLayout 582
11.17.2 BorderLayout 584
11.17.3 GridLayout 588
11.18 Using Panels to Manage More Complex Layouts 590
11.19 JTextArea 591
11.20 Wrap-Up 594
12 Graphics and Java 2D™ 609
12.1 Introduction 610
12.2 Graphics Contexts and Graphics Objects 612
12.3 Color Control 613
12.4 Font Control 620
12.5 Drawing Lines, Rectangles and Ovals 626
12.6 Drawing Arcs 630
12.7 Drawing Polygons and Polylines 633
12.8 Java 2D API 636
12.9 Wrap-Up 643
13 Exception Handling 652
13.1 Introduction 653
13.2 Exception-Handling Overview 654
13.3 Example: Divide by Zero without Exception Handling 655
13.4 Example: Handling ArithmeticException s and
InputMismatchExceptions 657
13.5 When to Use Exception Handling 662
13.6 Java Exception Hierarchy 663
13.7 finally Block 666
13.8 Stack Unwinding 670
13.9 printStackTrace , getStackTrace and getMessage 672
13.10 Chained Exceptions 674
13.11 Declaring New Exception Types 676
13.12 Preconditions and Postconditions 677
13.13 Assertions 678
13.14 Wrap-Up 679
14 Files and Streams 686
14.1 Introduction 687
14.2 Data Hierarchy 688
14.3 Files and Streams 690
14.4 Class File 692
14.5 Sequential-Access Text Files 696
14.5.1 Creating a Sequential-Access Text File 696
14.5.2 Reading Data from a Sequential-Access Text File 703
14.5.3 Case Study: A Credit-Inquiry Program 706
14.5.4 Updating Sequential-Access Files 710
14.6 Object Serialization 712
14.6.1 Creating a Sequential-Access File Using Object Serialization 713
14.6.2 Reading and Deserializing Data from a Sequential-Access File 718
14.7 Additional java.io Classes 721
14.8 Opening Files with JFileChooser 723
14.9 Wrap-Up 727
15 Recursion 737
15.1 Introduction 738
15.2 Recursion Concepts 739
15.3 Example Using Recursion: Factorials 740
15.4 Example Using Recursion: Fibonacci Series 743
15.5 Recursion and the Method-Call Stack 746
15.6 Recursion vs. Iteration 747
15.7 Towers of Hanoi 749
15.8 Fractals 752
15.9 Recursive Backtracking 763
15.10 Wrap-Up 763
15.11 Internet and Web Resources 764
16 Searching and Sorting 773
16.1 Introduction 774
16.2 Searching Algorithms 775
16.2.1 Linear Search 775
16.2.2 Binary Search 779
16.3 Sorting Algorithms 784
16.3.1 Selection Sort 785
16.3.2 Insertion Sort 789
16.3.3 Merge Sort 793
16.4 Invariants 799
16.5 Wrap-Up 800
17 Data Structures 806
17.1 Introduction 807
17.2 Type-Wrapper Classes for Primitive Types 808
17.3 Autoboxing and Auto-Unboxing 808
17.4 Self-Referential Classes 809
17.5 Dynamic Memory Allocation 810
17.6 Linked Lists 810
17.7 Stacks 821
17.8 Queues 825
17.9 Trees 827
17.10 Wrap-Up 834
18 Generics 859
18.1 Introduction 860
18.2 Motivation for Generic Methods 861
18.3 Generic Methods: Implementation and Compile-Time Translation 863
18.4 Additional Compile-Time Translation Issues: Methods That Use
a Type Parameter as the Return Type 866
18.5 Overloading Generic Methods 869
18.6 Generic Classes 870
18.7 Raw Types 880
18.8 Wildcards in Methods That Accept Type Parameters 884
18.9 Generics and Inheritance: Notes 888
18.10 Wrap-Up 889
18.11 Internet and Web Resources 889
19 Collections 894
19.1 Introduction 895
19.2 Collections Overview 896
19.3 Class Arrays 897
19.4 Interface Collection and Class Collections 900
19.5 Lists 901
19.5.1 ArrayList and Iterator 901
19.5.2 LinkedList 904
19.5.3 Vector 908
19.6 Collections Algorithms 912
19.6.1 Algorithm sort 913
19.6.2 Algorithm shuffle 917
19.6.3 Algorithms reverse , fill , copy , max and min 920
19.6.4 Algorithm binarySearch 922
19.6.5 Algorithms addAll , frequency and disjoint 924
19.7 Stack Class of Package java.util 925
19.8 Class PriorityQueue and Interface Queue 928
19.9 Sets 929
19.10 Maps 932
19.11 Properties Class 937
19.12 Synchronized Collections 940
19.13 Unmodifiable Collections 940
19.14 Abstract Implementations 941
19.15 Wrap-Up 941
20 Introduction to Java Applets 949
20.1 Introduction 950
20.2 Sample Applets Provided with the JDK 950
20.3 Simple Java Applet: Drawing a String 955
20.3.1 Executing an Applet in the appletviewer 957
20.3.2 Executing an Applet in a Web Browser 959
20.4 Applet Life-Cycle Methods 960
20.5 Initializing an Instance Variable with Method init 961
20.6 Sandbox Security Model 963
20.7 Internet and Web Resources 963
20.8 Wrap-Up 964
21 Multimedia: Applets and Applications 968
21.1 Introduction 969
21.2 Loading, Displaying and Scaling Images 970
21.3 Animating a Series of Images 973
21.4 Image Maps 978
21.5 Loading and Playing Audio Clips 981
21.6 Playing Video and Other Media with Java Media Framework 984
21.7 Wrap-Up 989
21.8 Web Resources 989
22 GUI Components: Part 2 996
22.1 Introduction 997
22.2 JSlider 997
22.3 Windows: Additional Notes 1001
22.4 Using Menus with Frames 1002
22.5 JPopupMenu 1010
22.6 Pluggable Look-and-Feel 1013
22.7 JDesktopPane and JInternalFrame 1017
22.8 JTabbedPane 1021
22.9 Layout Managers: BoxLayout and GridBagLayout 1023
22.10 Wrap-Up 1036
23 Multithreading 1043
23.1 Introduction 1044
23.2 Thread States: Life Cycle of a Thread 1046
23.3 Thread Priorities and Thread Scheduling 1048
23.4 Creating and Executing Threads 1050
23.4.1 Runnable s and the Thread Class 1050
23.4.2 Thread Management with the Executor Framework 1053
23.5 Thread Synchronization 1054
23.5.1 Unsynchronized Data Sharing 1055
23.5.2 Synchronized Data Sharing—Making Operations Atomic 1060
23.6 Producer/Consumer Relationship without Synchronization 1063
23.7 Producer/Consumer Relationship: ArrayBlockingQueue 1070
23.8 Producer/Consumer Relationship with Synchronization 1073
23.9 Producer/Consumer Relationship: Bounded Buffers 1079
23.10 Producer/Consumer Relationship: The Lock and Condition Interfaces 1087
23.11 Multithreading with GUI 1093
23.11.1 Performing Computations in a Worker Thread 1095
23.11.2 Processing Intermediate Results with SwingWorker 1100
23.12 Other Classes and Interfaces in java.util.concurrent 1108
23.13 Wrap-Up 1108
24 Networking 1119
24.1 Introduction 1120
24.2 Manipulating URLs 1121
24.3 Reading a File on a Web Server 1126
24.4 Establishing a Simple Server Using Stream Sockets 1130
24.5 Establishing a Simple Client Using Stream Sockets 1131
24.6 Client/Server Interaction with Stream Socket Connections 1132
24.7 Connectionless Client/Server Interaction with Datagrams 1144
24.8 Client/Server Tic-Tac-Toe Using a Multithreaded Server 1151
24.9 Security and the Network 1166
24.10 [Web Bonus] Case Study: DeitelMessenger Server and Client 1167
24.11 Wrap-Up 1167
25 Accessing Databases with JDBC 1174
25.1 Introduction 1175
25.2 Relational Databases 1176
25.3 Relational Database Overview: The books Database 1177
25.4 SQL 1180
25.4.1 Basic SELECT Query 1181
25.4.2 WHERE Clause 1182
25.4.3 ORDER BY Clause 1183
25.4.4 Merging Data from Multiple Tables: INNER JOIN 1185
25.4.5 INSERT Statement 1187
25.4.6 UPDATE Statement 1188
25.4.7 DELETE Statement 1189
25.5 Instructions for installing MySQL and MySQL Connector/J 1189
25.6 Instructions for Setting Up a MySQL User Account 1190
25.7 Creating Database books in MySQL 1191
25.8 Manipulating Databases with JDBC 1192
25.8.1 Connecting to and Querying a Database 1192
25.8.2 Querying the books Database 1197
25.9 RowSet Interface 1209
25.10 Java DB/Apache Derby 1212
25.11 PreparedStatement s 1213
25.12 Stored Procedures 1229
25.13 Transaction Processing 1229
25.14 Wrap-Up 1230
25.15 Web Resources and Recommended Readings 1230
26 Web Applications: Part 1 1241
26.1 Introduction 1242
26.2 Simple HTTP Transactions 1243
26.3 Multitier Application Architecture 1245
26.4 Java Web Technologies 1246
26.4.1 Servlets 1247
26.4.2 JavaServer Pages 1247
26.4.3 JavaServer Faces 1248
26.4.4 Web Technologies in Java Studio Creator 2 1249
26.5 Creating and Running a Simple Application in Java Studio Creator 2 1249
26.5.1 Examining a JSP File 1251
26.5.2 Examining a Page Bean File 1252
26.5.3 Event-Processing Life Cycle 1256
26.5.4 Relationship Between the JSP and Page Bean Files 1257
26.5.5 Examining the XHTML Generated by a Java Web Application 1257
26.5.6 Building a Web Application in Java Studio Creator 2 1259
26.6 JSF Components 1266
26.6.1 Text and Graphics Components 1267
26.6.2 Validation Using Validator Components and Custom Validators 1271
26.7 Session Tracking 1281
26.7.1 Cookies 1282
26.7.2 Session Tracking with the SessionBean Object 1296
26.8 Wrap-Up 1309
26.9 Web Resources 1310
27 Web Applications: Part 2 1322
27.1 Introduction 1323
27.2 Accessing Databases in Web Applications 1324
27.2.1 Building a Web Application That Displays Data from a Database 1324
27.2.2 Modifying the Page Bean File for the AddressBook Application 1333
27.3 Ajax-Enabled JSF Components 1336
27.3.1 Java BluePrints Component Library 1337
27.4 AutoComplete Text Field and Virtual Forms 1338
27.4.1 Configuring Virtual Forms 1338
27.4.2 JSP File with Virtual Forms and an AutoComplete Text Field 1340
27.4.3 Providing Suggestions for an AutoComplete Text Field 1344
27.5 Google Maps Map Viewer Component 1347
27.5.1 Obtaining a Google Maps API Key 1347
27.5.2 Adding a Map Viewer Component to a Page 1348
27.5.3 JSP File with a Map Viewer Component 1349
27.5.4 Page Bean that Displays a Map in the Map Viewer Component 1354
27.6 Wrap-Up 1359
27.7 Web Resources 1359
28 JAX-WS Web Services 1365
28.1 Introduction 1366
28.1.1 Downloading, Installing and Configuring Netbeans 5.5
and the Sun Java System Application Server 1368
28.1.2 Web Services Resource Center and Java Resource Centers at
www.deitel.com 1368
28.2 Java Web Services Basics 1369
28.3 Creating, Publishing, Testing and Describing a Web Service 1369
28.3.1 Creating a Web Application Project and Adding a Web
Service Class in Netbeans 1370
28.3.2 Defining the HugeInteger Web Service in Netbeans 1371
28.3.3 Publishing the HugeInteger Web Service from Netbeans 1375
28.3.4 Testing the HugeInteger Web Service with Sun Java System
Application Server's Tester Web page 1376
28.3.5 Describing a Web Service with the Web Service Description
Language (WSDL) 1379
28.4 Consuming a Web Service 1379
28.4.1 Creating a Client in Netbeans to Consume the HugeInteger
Web Service 1380
28.4.2 Consuming the HugeInteger Web Service 1383
28.5 SOAP 1389
28.6 Session Tracking in Web Services 1391
28.6.1 Creating a Blackjack Web Service 1392
28.6.2 Consuming the Blackjack Web Service 1396
28.7 Consuming a Database-Driven Web Service from a Web Application 1407
28.7.1 Configuring Java DB in Netbeans and Creating the
Reservation Database 1407
28.7.2 Creating a Web Application to Interact with the Reservation
Web Service 1411
28.8 Passing an Object of a User-Defined Type to a Web Service 1416
28.9 Wrap-Up 1427
28.10 Web Resources 1427
29 Formatted Output 1436
29.1 Introduction 1437
29.2 Streams 1437
29.3 Formatting Output with printf 1438
29.4 Printing Integers 1438
29.5 Printing Floating-Point Numbers 1439
29.6 Printing Strings and Characters 1441
29.7 Printing Dates and Times 1442
29.8 Other Conversion Characters 1445
29.9 Printing with Field Widths and Precisions 1447
29.10 Using Flags in the printf Format String 1449
29.11 Printing with Argument Indices 1452
29.12 Printing Literals and Escape Sequences 1453
29.13 Formatting Output with Class Formatter 1454
29.14 Wrap-Up 1455
30 Strings, Characters and Regular Expressions 1461
30.1 Introduction 1462
30.2 Fundamentals of Characters and Strings 1463
30.3 Class String 1463
30.3.1 String Constructors 1463
30.3.2 String Methods length , charAt and getChars 1464
30.3.3 Comparing Strings 1466
30.3.4 Locating Characters and Substrings in Strings 1470
30.3.5 Extracting Substrings from Strings 1472
30.3.6 Concatenating Strings 1473
30.3.7 Miscellaneous String Methods 1473
30.3.8 String Method valueOf 1475
30.4 Class StringBuilder 1476
30.4.1 StringBuilder Constructors 1477
30.4.2 StringBuilder Methods length , capacity , setLength and
ensureCapacity 1478
30.4.3 StringBuilder Methods charAt , setCharAt , getChars
and reverse 1479
30.4.4 StringBuilder append Methods 1480
30.4.5 StringBuilder Insertion and Deletion Methods 1482
30.5 Class Character 1483
30.6 Class StringTokenizer 1488
30.7 Regular Expressions, Class Pattern and Class Matcher 1489
30.8 Wrap-Up 1498
A Operator Precedence Chart 1509
B ASCII Character Set 1511
C Keywords and Reserved Words 1512
D Primitive Types 1513
E Number Systems 1514
E.1 Introduction 1515
E.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers 1518
E.3 Converting Octal and Hexadecimal Numbers to Binary Numbers 1519
E.4 Converting from Binary, Octal or Hexadecimal to Decimal 1519
E.5 Converting from Decimal to Binary, Octal or Hexadecimal 1520
E.6 Negative Binary Numbers: Two's Complement Notation 1522
F GroupLayout 1527
F.1 Introduction 1527
F.2 GroupLayout Basics 1527
F.3 Building a ColorChooser 1528
F.4 GroupLayout Web Resources 1538
G Java Desktop Integration Components (JDIC) 1540
G.1 Introduction 1540
G.2 Splash Screens 1540
G.3 Desktop Class 1542
G.4 Tray Icons 1545
G.5 JDIC Incubator Projects 1545
G.6 JDIC Demos 1545
H Mashups 1546
Web Bonus Appendices
Appendices I–Q are available as PDF documents at www.deitel.com/jhtp7/ .
I Unicode® I
I.1 Introduction I
I.2 Unicode Transformation Formats II
I.3 Characters and Glyphs III
I.4 Advantages/Disadvantages of Unicode IV
I.5 Unicode Consortium's Web Site IV
I.6 Using Unicode V
I.7 Character Ranges VII
J Using the Java API Documentation X
J.1 Introduction X
J.2 Navigating the Java API XI
K Creating Documentation with javadoc XIX
K.1 Introduction XIX
K.2 Documentation Comments XIX
K.3 Documenting Java Source Code XX
K.4 javadoc XXVII
K.5 Files Produced by javadoc XXVIII
L Bit Manipulation XXXI
L.1 Introduction XXXI
L.2 Bit Manipulation and the Bitwise Operators XXXI
L.3 BitSet Class XLI
M ATM Case Study Code XLV
M.1 ATM Case Study Implementation XLV
M.2 Class ATM XLVI
M.3 Class Screen LI
M.4 Class Keypad LII
M.5 Class CashDispenser LIII
M.6 Class DepositSlot LIV
M.7 Class Account LV
M.8 Class BankDatabase LVII
M.9 Class Transaction LX
M.10 Class BalanceInquiry LXI
M.11 Class Withdrawal LXI
M.12 Class Deposit LXVI
M.13 Class ATMCaseStudy LXIX
M.14 Wrap-Up LXIX
N Labeled break and continue Statements LXX
N.1 Introduction LXX
N.2 Labeled break Statement LXX
N.3 Labeled continue Statement LXXI
O UML 2: Additional Diagram Types LXXIII
O.1 Introduction LXXIII
O.2 Additional Diagram Types LXXIII
P Design Patterns LXXV
P.1 Introduction LXXV
P.2 Creational, Structural and Behavioral Design Patterns LXXVI
P.2.1 Creational Design Patterns LXXVII
P.2.2 Structural Design Patterns LXXIX
P.2.3 Behavioral Design Patterns LXXX
P.2.4 Conclusion LXXXI
P.3 Design Patterns in Packages java.awt and javax.swing LXXXII
P.3.1 Creational Design Patterns LXXXII
P.3.2 Structural Design Patterns LXXXII
P.3.3 Behavioral Design Patterns LXXXIV
P.3.4 Conclusion LXXXVIII
P.4 Concurrency Design Patterns LXXXVIII
P.5 Design Patterns Used in Packages java.io and java.net LXXXIX
P.5.1 Creational Design Patterns LXXXIX
P.5.2 Structural Design Patterns XC
P.5.3 Architectural Patterns XCI
P.5.4 Conclusion XCIII
P.6 Design Patterns Used in Package java.util XCIII
P.6.1 Creational Design Patterns XCIII
P.6.2 Behavioral Design Patterns XCIV
P.7 Wrap-Up XCIV
P.8 Web Resources XCV
Q Using the Debugger XCVII
Q.1 Introduction XCVIII
Q.2 Breakpoints and the run , stop , cont and print Commands XCVIII
Q.3 The print and set Commands CII
Q.4 Controlling Execution Using the step , step up and next Commands CIV
Q.5 The watch Command CVII
Q.6 The clear Command CIX
Q.7 Wrap-Up CXII
Index 1553