| 1 | Introduction to Computers, the Internet and the World Wide 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.1 | Java Class Libraries | 9 |
| 1.11 | FORTRAN, COBOL, Pascal and Ada | 11 |
| 1.12 | BASIC, Visual Basic, Visual C++, C# and .NET | 11 |
| 1.13 | Typical Java Development Environment | 12 |
| 1.14 | Notes about Java and Small Java How to Program, Sixth Edition | 15 |
| 1.15 | Test-Driving a Java Application | 16 |
| 1.16 | Introduction to Object Technology and the UML | 21 |
| 1.17 | Wrap-Up | 26 |
| 1.18 | Web Resources | 26 |
| 2 | Introduction to Java Applications | 35 |
| 2.1 | Introduction | 36 |
| 2.2 | First Program in Java: Printing a Line of Text | 36 |
| 2.3 | Modifying Our First Java Program | 43 |
| 2.4 | Displaying Text with printf | 45 |
| 2.5 | Another Java Application: Adding Integers | 47 |
| 2.6 | Memory Concepts | 51 |
| 2.7 | Arithmetic | 52 |
| 2.8 | Decision Making: Equality and Relational Operators | 56 |
| 2.9 | Wrap-Up | 60 |
| | | |
| 3 | Introduction to Classes and Objects | 72 |
| 3.1 | Introduction | 73 |
| 3.2 | Classes, Objects, Methods and Instance Variables | 73 |
| 3.3 | Declaring a Class with a Method and Instantiating an Object of a Class | 75 |
| 3.4 | Declaring a Method with a Parameter | 79 |
| 3.5 | Instance Variables, set Methods and get Methods | 82 |
| 3.6 | Primitive Types vs. Reference Types | 87 |
| 3.7 | Initializing Objects with Constructors | 88 |
| 3.8 | Floating-Point Numbers and Type double | 91 |
| 3.9 | (Optional) GUI and Graphics Case Study: Using Dialog Boxes | 95 |
| 3.1 | Wrap-Up | 98 |
| 4 | Control Statements: Part 1 | 106 |
| 4.1 | Introduction | 107 |
| 4.2 | Algorithms | 107 |
| 4.3 | Pseudocode | 108 |
| 4.4 | Control Structures | 108 |
| 4.5 | if Single-Selection Statement | 111 |
| 4.6 | if else Double-Selection Statement | 112 |
| 4.7 | while Repetition Statement | 117 |
| 4.8 | Formulating Algorithms: Counter-Controlled Repetition | 118 |
| 4.9 | Formulating Algorithms: Sentinel-Controlled Repetition | 123 |
| 4.1 | Formulating Algorithms: Nested Control Statements | 130 |
| 4.11 | Compound Assignment Operators | 136 |
| 4.12 | Increment and Decrement Operators | 137 |
| 4.13 | Primitive Types | 139 |
| 4.14 | (Optional) GUI and Graphics Case Study: Creating Simple Drawings | 140 |
| 4.15 | Wrap-Up | 145 |
| 5 | Control Statements: Part 2 | 157 |
| 5.1 | Introduction | 158 |
| 5.2 | Essentials of Counter-Controlled Repetition | 158 |
| 5.3 | for Repetition Statement | 160 |
| 5.4 | Examples Using the for Statement | 164 |
| 5.5 | do while Repetition Statement | 169 |
| 5.6 | switch Multiple-Selection Statement | 170 |
| 5.7 | break and continue Statements | 178 |
| 5.8 | Logical Operators | 180 |
| 5.9 | Structured Programming Summary | 186 |
| 5.1 | (Optional) GUI and Graphics Case Study: Drawing Rectangles and Ovals | 191 |
| 5.11 | Wrap-Up | 194 |
| 6 | Methods: A Deeper Look | 204 |
| 6.1 | Introduction | 205 |
| 6.2 | Program Modules in Java | 206 |
| 6.3 | static Methods, static Fields and Class Math | 207 |
| 6.4 | Declaring Methods with Multiple Parameters | 210 |
| 6.5 | Notes on Declaring and Using Methods | 214 |
| 6.6 | Method Call Stack and Activation Records | 215 |
| 6.7 | Argument Promotion and Casting | 215 |
| 6.8 | Java API Packages | 217 |
| 6.9 | Case Study: Random-Number Generation | 219 |
| 6.1 | Case Study: A Game of Chance (Introducing Enumerations) | 224 |
| 6.11 | Scope of Declarations | 229 |
| 6.12 | Method Overloading | 232 |
| 6.13 | (Optional) GUI and Graphics Case Study: Colors and Filled Shapes | 235 |
| 6.14 | Wrap-Up | 237 |
| 7 | Arrays | 252 |
| 7.1 | Introduction | |