| Figures |
| Tables |
| Examples |
| Foreword |
| Preface |
1 | Basics of Java Programming |
| 1.1 | Introduction |
| 1.2 | Classes |
| 1.3 | Objects |
| 1.4 | Instance Members |
| 1.5 | Static Members |
| 1.6 | Inheritance |
| 1.7 | Associations: Aggregation and Composition |
| 1.8 | Tenets of Java |
| | Review Questions |
| 1.9 | Java Programs |
| 1.10 | Sample Java Application |
| 1.11 | Program Output |
| 1.12 | The Java Ecosystem |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
2 | Language Fundamentals |
| 2.1 | Basic Language Elements |
| | Review Questions |
| 2.2 | Primitive Data Types |
| | Review Questions |
| 2.3 | Variable Declarations |
| 2.4 | Initial Values for Variables |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
3 | Declarations |
| 3.1 | Class Declarations |
| 3.2 | Method Declarations |
| 3.3 | Constructors |
| | Review Questions |
| 3.4 | Arrays |
| | Review Questions |
| 3.5 | Parameter Passing |
| 3.6 | Variable Arity Methods |
| 3.7 | The main() Method |
| 3.8 | Enumerated Types |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
4 | Access Control |
| 4.1 | Java Source File Structure |
| 4.2 | Packages |
| 4.3 | Searching for Classes |
| | Review Questions |
| 4.4 | Scope Rules |
| 4.5 | Accessibility Modifiers for Top-Level Type Declarations |
| 4.6 | Non-Accessibility Modifiers for Classes |
| | Review Questions |
| 4.7 | Member Accessibility Modifiers |
| | Review Questions |
| 4.8 | Non-Accessibility Modifiers for Members |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
5 | Operators and Expressions |
| 5.1 | Conversions |
| 5.2 | Type Conversion Contexts |
| 5.3 | Precedence and Associativity Rules for Operators |
| 5.4 | Evaluation Order of Operands |
| 5.5 | Representing Integers |
| 5.6 | The Simple Assignment Operator = |
| | Review Questions |
| 5.7 | Arithmetic Operators: * , / , % , + , - |
| | Review Questions |
| 5.8 | The Binary String Concatenation Operator + |
| 5.9 | Variable Increment and Decrement Operators: ++ , -- |
| | Review Questions |
| 5.10 | Boolean Expressions |
| 5.11 | Relational Operators: < , <= , > , >= |
| 5.12 | Equality |
| 5.13 | Boolean Logical Operators: ! , ^ , & , | |
| 5.14 | Conditional Operators: && , || |
| 5.15 | Integer Bitwise Operators: ~ , & , | , ^ |
| | Review Questions |
| 5.16 | The Conditional Operator: ?: |
| 5.17 | Other Operators: new , [] , instanceof , -> |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
6 | Control Flow |
| 6.1 | Overview of Control Flow Statements |
| 6.2 | Selection Statements |
| | Review Questions |
| 6.3 | Iteration Statements |
| 6.4 | Transfer Statements |
| | Review Questions |
| 6.5 | Stack-based Execution and Exception Propagation |
| 6.6 | Exception Types |
| 6.7 | Exception Handling: try , catch , and finally |
| 6.8 | The throw Statement |
| 6.9 | The throws Clause |
| 6.10 | Advantages of Exception Handling |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
7 | Object-oriented Programming |
| 7.1 | Single Implementation Inheritance |
| 7.2 | Overriding Methods |
| 7.3 | Hiding Members |
| 7.4 | The Object Reference super |
| | Review Questions |
| 7.5 | Chaining Constructors Using this() and super() |
| | Review Questions |
| 7.6 | Interfaces |
| | Review Questions |
| 7.7 | Arrays and Subtyping |
| 7.8 | Reference Values and Conversions |
| 7.9 | Reference Value Assignment Conversions |
| 7.10 | Method Invocation Conversions Involving References |
| 7.11 | Reference Casting and the instanceof Operator |
| | Review Questions |
| 7.12 | Polymorphism and Dynamic Method Lookup |
| 7.13 | Inheritance Versus Aggregation |
| 7.14 | Basic Concepts in Object-Oriented Design |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
8 | Fundamental Classes |
| 8.1 | Overview of the java.lang Package |
| 8.2 | The Object Class |
| | Review Questions |
| 8.3 | The Wrapper Classes |
| | Review Questions |
| 8.4 | The String Class |
| | Review Questions |
| 8.5 | The StringBuilder and the StringBuffer Classes |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
9 | Object Lifetime |
| 9.1 | Garbage Collection |
| 9.2 | Reachable Objects |
| 9.3 | Facilitating Garbage Collection |
| 9.4 | Object Finalization |
| 9.5 | Finalizer Chaining |
| 9.6 | Invoking Garbage Collection Programmatically |
| | Review Questions |
| 9.7 | Initializers |
| 9.8 | Field Initializer Expressions |
| 9.9 | Static Initializer Blocks |
| 9.10 | Instance Initializer Blocks |
| 9.11 | Constructing Initial Object State |
| | Review Questions |
| | Chapter Summary |
10 | The ArrayList<E> Class and Lambda Expressions |
| 11.1 | The ArrayList<E> Class |
| | Review Questions |
| 11.2 | Lambda Expressions |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
11 | Date and Time |
| 10.1 | Basic Date and Time Concepts |
| 10.2 | Working with Temporal Classes |
| 11.3 | Working with Periods |
| | Review Questions |
| 11.4 | Formatting and Parsing |
| | Review Questions |
| | Chapter Summary |
| | Programming Exercise |
A | Taking the Java SE 8 Programmer I Exam |
| A.1 | Preparing for the Exam |
| A.2 | Registering for the Exam |
| A.3 | How the Exam Is Conducted |
| A.4 | The Questions |
B | Exam Topics: Java SE 8 Programmer I |
C | Annotated Answers to Review Questions |
D | Solutions to Programming Exercises |
E | Mock Exam: Java SE 8 Programmer I |
F | Annotated Answers to Mock Exam I |
| Index |