1. 1. Prelude
    ❱
    1. 1.1. Asking for Help
    2. 1.2. Toy Problems
    3. 1.3. Lies
  2. 2. Getting Started
  3. 3. First Steps
    ❱
    1. 3.1. Comments
    2. 3.2. Semicolons
    3. 3.3. Formatting
    4. 3.4. Challenges
  4. 4. Local Variables
    ❱
    1. 4.1. Naming
    2. 4.2. Reassignment
    3. 4.3. Delayed Assignment
    4. 4.4. Types
    5. 4.5. Final Variables
    6. 4.6. Inferred Types
    7. 4.7. Challenges
  5. Data Types I
  6. 5. Booleans
    ❱
    1. 5.1. And
    2. 5.2. Or
    3. 5.3. Not
    4. 5.4. Operator Precedence
    5. 5.5. Challenges
  7. 6. Integers
    ❱
    1. 6.1. Integer Literals
    2. 6.2. Addition
    3. 6.3. Subtraction
    4. 6.4. Multiplication
    5. 6.5. Division
    6. 6.6. Remainder
    7. 6.7. Equality
    8. 6.8. Comparison
    9. 6.9. Chained Comparisons
    10. 6.10. Operator Precedence
    11. 6.11. Reassignment
    12. 6.12. Shorthands for Reassignment
    13. 6.13. Limits
    14. 6.14. Challenges
  8. 7. Floating Point Numbers
    ❱
    1. 7.1. Floating Point Literals
    2. 7.2. Accuracy
    3. 7.3. Addition
    4. 7.4. Subtraction
    5. 7.5. Multiplication
    6. 7.6. Division
    7. 7.7. Equality
    8. 7.8. Comparison
    9. 7.9. Shorthands for Reassignment
    10. 7.10. NaN
    11. 7.11. Positive and Negative Infinity
    12. 7.12. Square Root
    13. 7.13. Conversion to Integers
    14. 7.14. Conversion from Integers
    15. 7.15. Challenges
  9. 8. Characters
    ❱
    1. 8.1. Character Literals
    2. 8.2. Common Escape Sequences
    3. 8.3. Conversion to Integers
    4. 8.4. Conversion from Integers
    5. 8.5. Unicode
    6. 8.6. Challenges
  10. 9. Strings
    ❱
    1. 9.1. String Literals
    2. 9.2. Common Escape Sequences
    3. 9.3. The Empty String
    4. 9.4. Multiline String Literals
    5. 9.5. Concatenation
    6. 9.6. Equality
    7. 9.7. Length
    8. 9.8. Access Individual Characters
    9. 9.9. Challenges
  11. Control Flow I
  12. 10. Branching Paths
    ❱
    1. 10.1. If
    2. 10.2. Else
    3. 10.3. Nested Ifs
    4. 10.4. Else If
    5. 10.5. Relation to Delayed Assignment
    6. 10.6. Conditional Operator
    7. 10.7. Boolean Expressions
    8. 10.8. Challenges
  13. 11. Loops
    ❱
    1. 11.1. While
    2. 11.2. Endless Loops
    3. 11.3. Break
    4. 11.4. Continue
    5. 11.5. Unreachable Code
    6. 11.6. Do While
    7. 11.7. Nested Loops
    8. 11.8. Labeled Break
    9. 11.9. Labeled Continue
    10. 11.10. Iteration
    11. 11.11. Counting Up
    12. 11.12. Counting Down
    13. 11.13. Iterate over a String
    14. 11.14. Challenges
  14. Data Types II
  15. 12. Arrays
    ❱
    1. 12.1. Array Initializers
    2. 12.2. Length
    3. 12.3. Access Individual Elements
    4. 12.4. Set Individual Elements
    5. 12.5. Aliasing
    6. 12.6. Reassignment
    7. 12.7. Relation to Final Variables
    8. 12.8. Printing the Contents of an Array
    9. 12.9. Empty Array
    10. 12.10. Difference between Initializer and Literal
    11. 12.11. Challenges
  16. Control Flow II
  17. 13. Loops II
    ❱
    1. 13.1. For
    2. 13.2. For Syntax
    3. 13.3. Counting Up and Down
    4. 13.4. Iterate over a String
    5. 13.5. Iterate over an Array
    6. 13.6. Comparison to while
    7. 13.7. i
    8. 13.8. Break
    9. 13.9. Continue
    10. 13.10. Delayed Assignment
    11. 13.11. Inferred Types
    12. 13.12. Empty Initializers
    13. 13.13. Empty Expressions
    14. 13.14. Empty Statements
    15. 13.15. Final Variables
    16. 13.16. Labeled Break
    17. 13.17. Labeled Continue
    18. 13.18. Drawing Right Triangles
    19. 13.19. Drawing Isosceles Triangles
    20. 13.20. Challenges
  18. Code Structure
  19. 14. Methods
    ❱
    1. 14.1. Declaration
    2. 14.2. Invocation
    3. 14.3. Scope
    4. 14.4. Return
    5. 14.5. Unreachable Statements
    6. 14.6. main
    7. 14.7. Challenges
  20. 15. Arguments
    ❱
    1. 15.1. Declaration
    2. 15.2. Invocation with Arguments
    3. 15.3. Reassignment
    4. 15.4. Final Arguments
    5. 15.5. Aliasing
    6. 15.6. Overloading
    7. 15.7. Inferred Types
    8. 15.8. Challenges
  21. 16. Return Values
    ❱
    1. 16.1. void
    2. 16.2. Conversion
    3. 16.3. Pure Functions
    4. 16.4. Impure Functions
  22. User Input
  23. 17. User Input
  24. Data Types III
  25. 18. Identity Types
    ❱
    1. 18.1. Comparison with ==
  26. 19. Primitive Types
  27. 20. null
    ❱
    1. 20.1. Checking for null
    2. 20.2. Field Access
    3. 20.3. Instance Methods
  28. 21. Boxed Primitives
    ❱
    1. 21.1. Primitive Types
    2. 21.2. Integer
    3. 21.3. Double
    4. 21.4. Character
    5. 21.5. Boolean
    6. 21.6. Unboxing Conversion
    7. 21.7. Boxing Conversion
    8. 21.8. Arrays of Boxed Primitives
    9. 21.9. Challenges
  29. 22. Arrays II
    ❱
    1. 22.1. Default Values
    2. 22.2. Populate Array
  30. Code Structure II
  31. 23. Classes
    ❱
    1. 23.1. Class Declaration
    2. 23.2. User Defined Types
    3. 23.3. Naming Classes
    4. 23.4. Field Declaration
    5. 23.5. Field Access
    6. 23.6. Naming Fields
    7. 23.7. new
    8. 23.8. Zero Values
    9. 23.9. Aliasing
    10. 23.10. null
  32. 24. Constructors
    ❱
    1. 24.1. this
    2. 24.2. The Default Constructor
    3. 24.3. Final Fields
    4. 24.4. Multiple Constructors
  33. 25. Instance Methods
    ❱
    1. 25.1. Declaration
    2. 25.2. Invocation
    3. 25.3. this
    4. 25.4. Aliasing
    5. 25.5. Derived Values
  34. 26. Documentation
    ❱
    1. 26.1. Documentation Comments
  35. 27. Testing
  36. 28. Example: "Growable" Array
  37. User Defined Types
  38. 29. Primitive Classes
  39. 30. Reference Classes

Modern Java

Default Values