1.2 The Internet and the World Wide Web
1.6 Typical Java Development Environment
1.7 Notes about Java and Java for Programmers
1.8 Test-Driving a Java Application
1.9 Software Engineering Case Study: Introduction to Object Technology and the UML
2. Introduction to Java Applications
2.2 A First Program in Java: Printing a Line of Text
2.3 Modifying Our First Java Program
2.4 Displaying Text with printf
2.5 Another Java Application: Adding Integers
2.7 Decision Making: Equality and Relational Operators
2.8 (Optional) Software Engineering Case Study: Examining the Requirements Document
3. Introduction to Classes and Objects
3.2 Classes, Objects, Methods and Instance Variables
3.3 Declaring a Class with a Method and Instantiating an Object of a Class
3.4 Declaring a Method with a Parameter
3.5 Instance Variables, set Methods and get Methods
3.6 Primitive Types vs. Reference Types
3.7 Initializing Objects with Constructors
3.8 Floating-Point Numbers and Type double
3.9 (Optional) Software Engineering Case Study: Identifying the Classes in a Requirements Document
4.3 if
Single-Selection Statement
4.4 if...else
Double-Selection Statement
4.5 while
Repetition Statement
4.6 Counter-Controlled Repetition
4.7 Sentinel-Controlled Repetition
4.9 Compound Assignment Operators
4.10 Increment and Decrement Operators
4.12 (Optional) Software Engineering Case Study: Identifying Class Attributes
5.2 Essentials of Counter-Controlled Repetition
5.4 Examples Using the for
Statement
5.5 do...while
Repetition Statement
5.6 switch
Multiple-Selection Statement
5.7 break
and continue
Statements
5.9 (Optional) Software Engineering Case Study: Identifying Objects’ States and Activities
6.3 static
Methods, static
Fields and Class Math
6.4 Declaring Methods with Multiple Parameters
6.5 Notes on Declaring and Using Methods
6.6 Method-Call Stack and Activation Records
6.7 Argument Promotion and Casting
6.9 Case Study: Random-Number Generation
6.9.1 Generalized Scaling and Shifting of Random Numbers
6.9.2 Random-Number Repeatability for Testing and Debugging
6.10 Case Study: A Game of Chance (Introducing Enumerations)
6.13 Introduction to Recursion
6.15 Example Using Recursion: Factorials
6.16 Example Using Recursion: Fibonacci Series
6.17 Recursion and the Method-Call Stack
6.19 (Optional) Software Engineering Case Study: Identifying Class Operations
7.3 Declaring and Creating Arrays
7.5 Case Study: Card Shuffling and Dealing Simulation
7.8 Case Study: Class GradeBook
Using an Array to Store Grades
7.10 Case Study: Class GradeBook
Using a Two-Dimensional Array
7.11 Variable-Length Argument Lists
7.12 Using Command-Line Arguments
7.13 (Optional) Software Engineering Case Study: Collaboration Among Objects
8. Classes and Objects: A Deeper Look
8.3 Controlling Access to Members
8.4 Referring to the Current Object’s Members with the this
Reference
8.5 Time
Class Case Study: Overloaded Constructors
8.6 Default and No-Argument Constructors
8.7 Notes on Set and Get Methods
8.10 Garbage Collection and Method finalize
8.15 Data Abstraction and Encapsulation
8.16 Time
Class Case Study: Creating Packages
8.18 (Optional) Software Engineering Case Study: Starting to Program the Classes of the ATM System
9. Object-Oriented Programming: Inheritance
9.2 Superclasses and Subclasses
9.4 Relationship between Superclasses and Subclasses
9.4.1 Creating and Using a CommissionEmployee
Class
9.4.2 Creating a BasePlusCommissionEmployee
Class without Using Inheritance
9.4.3 Creating a CommissionEmployee–BasePlusCommissionEmployee
Inheritance Hierarchy
9.5 Constructors in Subclasses
9.6 Software Engineering with Inheritance
10. Object-Oriented Programming: Polymorphism
10.3 Demonstrating Polymorphic Behavior
10.4 Abstract Classes and Methods
10.5 Case Study: Payroll System Using Polymorphism
10.5.1 Creating Abstract Superclass Employee
10.5.2 Creating Concrete Subclass SalariedEmployee
10.5.3 Creating Concrete Subclass HourlyEmployee
10.5.4 Creating Concrete Subclass CommissionEmployee
10.5.5 Creating Indirect Concrete Subclass BasePlusCommissionEmployee
10.5.6 Demonstrating Polymorphic Processing, Operator instanceof
and Downcasting
10.5.7 Summary of the Allowed Assignments Between Superclass and Subclass Variables
10.6 final
Methods and Classes
10.7 Case Study: Creating and Using Interfaces
10.7.1 Developing a Payable
Hierarchy
10.7.2 Declaring Interface Payable
10.7.4 Modifying Class Employee
to Implement Interface Payable
10.7.5 Modifying Class SalariedEmployee
for Use in the Payable
Hierarchy
10.7.6 Using Interface Payable
to Process Invoices
and Employees
Polymorphically
10.7.7 Declaring Constants with Interfaces
10.7.8 Common Interfaces of the Java API
10.8 (Optional) Software Engineering Case Study: Incorporating Inheritance into the ATM System
11.2 Simple GUI-Based Input/Output with JOptionPane
11.3 Overview of Swing Components
11.4 Displaying Text and Images in a Window
11.5 Text Fields and an Introduction to Event Handling with Nested Classes
11.6 Common GUI Event Types and Listener Interfaces
11.9 Buttons That Maintain State
11.10 JComboBox
and Using an Anonymous Inner Class for Event Handling
11.12 Multiple-Selection Lists
11.15 JPanel
Subclass for Drawing with the Mouse
11.18 Using Panels to Manage More Complex Layouts
12.2 Graphics Contexts and Graphics Objects
12.5 Drawing Lines, Rectangles and Ovals
12.7 Drawing Polygons and Polylines
13.2 Exception-Handling Overview
13.3 Example: Divide by Zero without Exception Handling
13.4 Example: Handling ArithmeticExceptions
and InputMismatchExceptions
13.5 When to Use Exception Handling
13.9 printStackTrace, getStackTrace
and getMessage
13.11 Declaring New Exception Types
13.12 Preconditions and Postconditions
14.5 Sequential-Access Text Files
14.5.1 Creating a Sequential-Access Text File
14.5.2 Reading Data from a Sequential-Access Text File
14.5.3 Case Study: A Credit-Inquiry Program
14.5.4 Updating Sequential-Access Files
14.6.1 Creating a Sequential-Access File Using Object Serialization
14.6.2 Reading and Deserializing Data from a Sequential-Access File
14.7 Additional java.io
Classes
14.8 Opening Files with JFileChooser
15.2 Motivation for Generic Methods
15.3 Generic Methods: Implementation and Compile-Time Translation
15.5 Overloading Generic Methods
15.8 Wildcards in Methods That Accept Type Parameters
15.9 Generics and Inheritance: Notes
15.11 Internet and Web Resources
16.4 Interface Collection
and Class Collections
16.6.3 Algorithms reverse, fill, copy, max
and min
16.6.5 Algorithms addAll, frequency
and disjoint
16.7 Stack
Class of Package java.util
16.8 Class PriorityQueue
and Interface Queue
16.12 Synchronized Collections
16.13 Unmodifiable Collections
16.14 Abstract Implementations
17.3 Windows: Additional Notes
17.7 JDesktopPane
and JInternalFrame
17.9 Layout Managers: BoxLayout
and GridBagLayout
18.2 Thread States: Life Cycle of a Thread
18.3 Thread Priorities and Thread Scheduling
18.4 Creating and Executing Threads
18.4.1 Runnables and the Thread Class
18.4.2 Thread Management with the Executor Framework
18.5.1 Unsynchronized Data Sharing
18.5.2 Synchronized Data Sharing—Making Operations Atomic
18.6 Producer/Consumer Relationship without Synchronization
18.7 Producer/Consumer Relationship: ArrayBlockingQueue
18.8 Producer/Consumer Relationship with Synchronization
18.9 Producer/Consumer Relationship: Bounded Buffers
18.10 Producer/Consumer Relationship: The Lock
and Condition
Interfaces
18.11.1 Performing Computations in a Worker Thread
18.11.2 Processing Intermediate Results with SwingWorker
18.12 Other Classes and Interfaces in java.util.concurrent
19.3 Reading a File on a Web Server
19.4 Establishing a Simple Server Using Stream Sockets
19.5 Establishing a Simple Client Using Stream Sockets
19.6 Client/Server Interaction with Stream Socket Connections
19.7 Connectionless Client/Server Interaction with Datagrams
19.8 Client/Server Tic-Tac-Toe Using a Multithreaded Server
19.10 [Web Bonus] Case Study: DeitelMessenger Server and Client
20. Accessing Databases with JDBC
20.3 Relational Database Overview: The books
Database
20.4.4 Merging Data from Multiple Tables: INNER JOIN
20.5 Instructions for Installing MySQL and MySQL Connector/J
20.6 Instructions for Setting Up a MySQL User Account
20.7 Creating Database books
in MySQL
20.8 Manipulating Databases with JDBC
20.8.1 Connecting to and Querying a Database
20.8.2 Querying the books Database
21. JavaServer™ Faces Web Applications
21.3 Multitier Application Architecture
21.4.4 Web Technologies in Netbeans
21.5 Creating and Running a Simple Application in Netbeans
21.5.1 Examining a JSP Document
21.5.2 Examining a Page Bean File
21.5.3 Event-Processing Life Cycle
21.5.4 Building a Web Application in Netbeans
21.6.1 Text and Graphics Components
21.6.2 Validation Using Validator Components and Custom Validators
21.7.2 Session Tracking with Session Beans
22. Ajax-Enabled JavaServer™ Faces Web Applications
22.2 Accessing Databases in Web Applications
22.2.1 Building a Web Application That Displays Data from a Database
22.2.2 Modifying the Page Bean File for the AddressBook
Application
22.3 Ajax-Enabled JSF Components
22.4 Creating an Autocomplete Text Field
and Using Virtual Forms
22.4.1 Configuring Virtual Forms
22.4.2 JSP File with Virtual Forms and an Autocomplete Text Field
22.4.3 Providing Suggestions for an Autocomplete Text Field
22.4.4 Displaying the Contact’s Information
23.3 Creating, Publishing, Testing and Describing a Web Service
23.3.1 Creating a Web Application Project and Adding a Web Service Class in Netbeans
23.3.2 Defining the HugeInteger
Web Service in Netbeans
23.3.3 Publishing the HugeInteger
Web Service from Netbeans
23.3.4 Testing the HugeInteger
Web Service with GlassFish Application Server’s Tester
Web Page
23.3.5 Describing a Web Service with the Web Service Description Language (WSDL)
23.4.1 Creating a Client in Netbeans to Consume the HugeInteger
Web Service
23.4.2 Consuming the HugeInteger
Web Service
23.6 Session Tracking in Web Services
23.6.1 Creating a Blackjack
Web Service
23.6.2 Consuming the Blackjack
Web Service
23.7 Consuming a Database-Driven Web Service from a Web Application
23.7.1 Creating the Reservation
Database
23.7.2 Creating a Web Application to Interact with the Reservation
Web Service
23.8 Passing an Object of a User-Defined Type to a Web Service
24.3 Formatting Output with printf
24.5 Printing Floating-Point Numbers
24.6 Printing Strings and Characters
24.8 Other Conversion Characters
24.9 Printing with Field Widths and Precisions
24.10 Using Flags in the printf
Format String
24.11 Printing with Argument Indices
24.12 Printing Literals and Escape Sequences
24.13 Formatting Output with Class Formatter
25. Strings, Characters and Regular Expressions
25.2 Fundamentals of Characters and Strings
25.3.2 String
Methods length, charAt
and getChars
25.3.4 Locating Characters and Substrings in Strings
25.3.5 Extracting Substrings from Strings
25.3.7 Miscellaneous String
Methods
25.4.1 StringBuilder
Constructors
25.4.2 StringBuilder
Methods length, capacity, setLength
and ensureCapacity
25.4.3 StringBuilder
Methods charAt, setCharAt, getChars
and reverse
25.4.4 StringBuilder
append Methods
25.4.5 StringBuilder
Insertion and Deletion Methods
25.7 Regular Expressions, Class Pattern
and Class Matcher
C. Keywords and Reserved Words
F. Java Desktop Integration Components (JDIC)
G. Using the Java API Documentation
H.1 ATM Case Study Implementation
I. UML 2: Additional Diagram Types
J.2 Breakpoints and the run, stop, cont
and print
Commands
J.3 The print
and set
Commands
J.4 Controlling Execution Using the step, step up
and next
Commands