Books & Videos

Table of Contents

  1. Chapter 1 The Way of the Program

    1. What Is Programming?

    2. What Is Computer Science?

    3. Programming Languages

    4. The Hello World Program

    5. Displaying Strings

    6. Escape Sequences

    7. Formatting Code

    8. Debugging Code

    9. Vocabulary

    10. Exercises

  2. Chapter 2 Variables and Operators

    1. Declaring Variables

    2. Assignment

    3. State Diagrams

    4. Printing Variables

    5. Arithmetic Operators

    6. Floating-Point Numbers

    7. Rounding Errors

    8. Operators for Strings

    9. Composition

    10. Types of Errors

    11. Vocabulary

    12. Exercises

  3. Chapter 3 Input and Output

    1. The System Class

    2. The Scanner Class

    3. Program Structure

    4. Inches to Centimeters

    5. Literals and Constants

    6. Formatting Output

    7. Centimeters to Inches

    8. Modulus Operator

    9. Putting It All Together

    10. The Scanner Bug

    11. Vocabulary

    12. Exercises

  4. Chapter 4 Void Methods

    1. Math Methods

    2. Composition Revisited

    3. Adding New Methods

    4. Flow of Execution

    5. Parameters and Arguments

    6. Multiple Parameters

    7. Stack Diagrams

    8. Reading Documentation

    9. Writing Documentation

    10. Vocabulary

    11. Exercises

  5. Chapter 5 Conditionals and Logic

    1. Relational Operators

    2. Logical Operators

    3. Conditional Statements

    4. Chaining and Nesting

    5. Flag Variables

    6. The return Statement

    7. Validating Input

    8. Recursive Methods

    9. Recursive Stack Diagrams

    10. Binary Numbers

    11. Vocabulary

    12. Exercises

  6. Chapter 6 Value Methods

    1. Return Values

    2. Writing Methods

    3. Method Composition

    4. Overloading

    5. Boolean Methods

    6. Javadoc Tags

    7. More Recursion

    8. Leap of Faith

    9. One More Example

    10. Vocabulary

    11. Exercises

  7. Chapter 7 Loops

    1. The while Statement

    2. Generating Tables

    3. Encapsulation and Generalization

    4. More Generalization

    5. The for Statement

    6. The do-while Loop

    7. break and continue

    8. Vocabulary

    9. Exercises

  8. Chapter 8 Arrays

    1. Creating Arrays

    2. Accessing Elements

    3. Displaying Arrays

    4. Copying Arrays

    5. Array Length

    6. Array Traversal

    7. Random Numbers

    8. Traverse and Count

    9. Building a Histogram

    10. The Enhanced for Loop

    11. Vocabulary

    12. Exercises

  9. Chapter 9 Strings and Things

    1. Characters

    2. Strings Are Immutable

    3. String Traversal

    4. Substrings

    5. The indexOf Method

    6. String Comparison

    7. String Formatting

    8. Wrapper Classes

    9. Command-Line Arguments

    10. Vocabulary

    11. Exercises

  10. Chapter 10 Objects

    1. Point Objects

    2. Attributes

    3. Objects as Parameters

    4. Objects as Return Types

    5. Mutable Objects

    6. Aliasing

    7. The null Keyword

    8. Garbage Collection

    9. Class Diagrams

    10. Java Library Source

    11. Vocabulary

    12. Exercises

  11. Chapter 11 Classes

    1. The Time Class

    2. Constructors

    3. More Constructors

    4. Getters and Setters

    5. Displaying Objects

    6. The toString Method

    7. The equals Method

    8. Adding Times

    9. Pure Methods and Modifiers

    10. Vocabulary

    11. Exercises

  12. Chapter 12 Arrays of Objects

    1. Card Objects

    2. Card toString

    3. Class Variables

    4. The compareTo Method

    5. Cards Are Immutable

    6. Arrays of Cards

    7. Sequential Search

    8. Binary Search

    9. Tracing the Code

    10. Recursive Version

    11. Vocabulary

    12. Exercises

  13. Chapter 13 Objects of Arrays

    1. The Deck Class

    2. Shuffling Decks

    3. Selection Sort

    4. Merge Sort

    5. Subdecks

    6. Merging Decks

    7. Adding Recursion

    8. Vocabulary

    9. Exercises

  14. Chapter 14 Objects of Objects

    1. Decks and Hands

    2. CardCollection

    3. Inheritance

    4. Dealing Cards

    5. The Player Class

    6. The Eights Class

    7. Class Relationships

    8. Vocabulary

    9. Exercises

  15. Appendix Development Tools

    1. Installing DrJava

    2. DrJava Interactions

    3. Command-Line Interface

    4. Command-Line Testing

    5. Running Checkstyle

    6. Tracing with a Debugger

    7. Testing with JUnit

    8. Vocabulary

  16. Appendix Java 2D Graphics

    1. Creating Graphics

    2. Graphics Methods

    3. Example Drawing

    4. Vocabulary

    5. Exercises

  17. Appendix Debugging

    1. Compile-Time Errors

    2. Run-Time Errors

    3. Logic Errors