1.
Prelude
❱
1.1.
Asking for Help
1.2.
Toy Problems
1.3.
Lies
2.
Getting Started
3.
First Steps
❱
3.1.
Comments
3.2.
Semicolons
3.3.
Formatting
3.4.
Challenges
4.
Local Variables
❱
4.1.
Naming
4.2.
Reassignment
4.3.
Delayed Assignment
4.4.
Types
4.5.
Final Variables
4.6.
Inferred Types
4.7.
Challenges
Data Types I
5.
Booleans
❱
5.1.
Not
5.2.
And
5.3.
Or
5.4.
Operator Precedence
5.5.
Challenges
6.
Integers
❱
6.1.
Integer Literals
6.2.
Addition
6.3.
Subtraction
6.4.
Multiplication
6.5.
Division
6.6.
Remainder
6.7.
Equality
6.8.
Comparison
6.9.
Chained Comparisons
6.10.
Operator Precedence
6.11.
Reassignment
6.12.
Shorthands for Reassignment
6.13.
Limits
6.14.
Challenges
7.
Floating Point Numbers
❱
7.1.
Floating Point Literals
7.2.
Accuracy
7.3.
Addition
7.4.
Subtraction
7.5.
Multiplication
7.6.
Division
7.7.
Equality
7.8.
Comparison
7.9.
Shorthands for Reassignment
7.10.
NaN
7.11.
Positive and Negative Infinity
7.12.
Square Root
7.13.
Conversion to Integers
7.14.
Conversion from Integers
7.15.
Challenges
8.
Characters
❱
8.1.
Character Literals
8.2.
Common Escape Sequences
8.3.
Conversion to Integers
8.4.
Conversion from Integers
8.5.
Unicode
8.6.
Challenges
9.
Strings
❱
9.1.
String Literals
9.2.
Common Escape Sequences
9.3.
The Empty String
9.4.
Multiline String Literals
9.5.
Concatenation
9.6.
Equality
9.7.
Length
9.8.
Access Individual Characters
9.9.
Challenges
Control Flow I
10.
Branching Paths
❱
10.1.
If
10.2.
Nested Ifs
10.3.
Else
10.4.
Else If
10.5.
Relation to Delayed Assignment
10.6.
Scoped Variables
10.7.
Conditional Operator
10.8.
Boolean Expressions
10.9.
Challenges
11.
Loops
❱
11.1.
While
11.2.
Endless Loops
11.3.
Break
11.4.
Continue
11.5.
Unreachable Code
11.6.
Do While
11.7.
Nested Loops
11.8.
Labeled Break
11.9.
Labeled Continue
11.10.
Iteration
11.11.
Counting Up
11.12.
Counting Down
11.13.
Iterate over a String
11.14.
Challenges
Data Types II
12.
Arrays
❱
12.1.
Array Initializers
12.2.
Length
12.3.
Access Individual Elements
12.4.
Set Individual Elements
12.5.
Aliasing
12.6.
Reassignment
12.7.
Relation to Final Variables
12.8.
Printing the Contents of an Array
12.9.
Empty Array
12.10.
Difference between Initializer and Literal
12.11.
Initialization with new
12.12.
Challenges
Control Flow II
13.
Loops II
❱
13.1.
For
13.2.
For Syntax
13.3.
Counting Up and Down
13.4.
Iterate over a String
13.5.
Iterate over an Array
13.6.
Comparison to while
13.7.
i
13.8.
Break
13.9.
Continue
13.10.
Delayed Assignment
13.11.
Inferred Types
13.12.
Empty Initializers
13.13.
Empty Expressions
13.14.
Empty Statements
13.15.
Final Variables
13.16.
Labeled Break
13.17.
Labeled Continue
13.18.
Drawing Right Triangles
13.19.
Drawing Isosceles Triangles
13.20.
Challenges
Code Structure
14.
Methods
❱
14.1.
Declaration
14.2.
Invocation
14.3.
Scope
14.4.
main
14.5.
Challenges
15.
Arguments
❱
15.1.
Declaration
15.2.
Invocation with Arguments
15.3.
Reassignment
15.4.
Final Arguments
15.5.
Aliasing
15.6.
Overloading
15.7.
Inferred Types
15.8.
Challenges
16.
Return Values
❱
16.1.
Declaration
16.2.
Return Statement
16.3.
Exhaustiveness
16.4.
void
16.5.
Return in void methods
16.6.
Conversion
16.7.
Unreachable Statements
16.8.
Challenges
Data Types III
17.
null
❱
17.1.
Null as Absence
17.2.
Null as Unknown
17.3.
Checking for null
17.4.
NullPointerException
17.5.
Challenges
18.
Boxed Primitives
❱
18.1.
Integer
18.2.
Double
18.3.
Character
18.4.
Boolean
18.5.
Unboxing Conversion
18.6.
Boxing Conversion
18.7.
Arrays of Boxed Primitives
18.8.
Challenges
19.
Arrays II
❱
19.1.
Initializion with Size
19.2.
Default Values
19.3.
Populate Arrays
19.4.
Challenges
Code Structure II
20.
Classes
❱
20.1.
The meaning of the word Class
20.2.
Class Declaration
20.3.
Naming
20.4.
Instances
20.5.
Fields
20.6.
Field Initialization
20.7.
Field Access
20.8.
Field Default Values
20.9.
Aliasing
20.10.
Return Multiple Values
20.11.
Challenges
21.
Instance Methods
❱
21.1.
Invocation
21.2.
Arguments
21.3.
Field Access
21.4.
Field Updates
21.5.
Derived Values
21.6.
Invoke Other Methods
21.7.
this
21.8.
Disambiguation
21.9.
Clarity
21.10.
Challenges
Data Types IV
22.
Enums
❱
22.1.
Declaration
22.2.
Variants
22.3.
Naming
22.4.
Usage
22.5.
Equality
22.6.
Comparison to boolean
22.7.
Challenges
23.
Strings II
❱
23.1.
lowercase
23.2.
UPPERCASE
23.3.
Equality ignoring case
23.4.
Check if empty
23.5.
Check if blank
23.6.
Strip extra whitespace
23.7.
Challenges
Control Flow III
24.
Exceptions
❱
24.1.
throw
24.2.
Messages
24.3.
Stack Traces
24.4.
try/catch
24.5.
Challenges
25.
Switch
❱
25.1.
Case and Default
25.2.
Strings
25.3.
ints
25.4.
Enums
25.5.
Omitted Default
25.6.
Exhaustiveness
25.7.
Combining Cases
25.8.
null
25.9.
Challenges
Code Structure III
26.
Constructors
❱
26.1.
Declaration
26.2.
The Default Constructor
26.3.
Arguments
26.4.
Final Fields
26.5.
Invariants
26.6.
Overloads
26.7.
Delegation
26.8.
Challenges
27.
Global Fields
❱
27.1.
Default Values
27.2.
Final Fields
27.3.
Field Access
27.4.
Inferred Types
27.5.
Challenges
Concepts
28.
Code is Read more than Written
❱
28.1.
Meaning
28.2.
Implications
28.3.
Information Density
28.4.
Audience
28.5.
Practice
Interactive Programs
29.
Standard Input
❱
29.1.
Prompting
29.2.
Interpreting Input
29.3.
Reprompting
29.4.
Leniency
29.5.
Delayed Assignment
29.6.
Transporting Data
The Computing Environment
30.
Hardware
❱
30.1.
CPU
30.2.
RAM
30.3.
Hard Drives
30.4.
Motherboard
31.
Operating Systems
❱
31.1.
Personal Computers
31.2.
Servers
31.3.
Mobile Phones
31.4.
Game Consoles
31.5.
Abstractions
31.6.
Defaults
32.
The Terminal
❱
32.1.
Bash
32.2.
Windows Subsystem for Linux
32.3.
Chromebooks and School Computers
32.4.
Commands
32.5.
Directories
32.6.
Listing Files
32.7.
Creating Directories
32.8.
Changing Directories
32.9.
Creating Files
32.10.
Run Java Programs
32.11.
Getting Used to it
Control Flow IV
33.
Exceptions II
❱
33.1.
Checked Exceptions
33.2.
Unchecked Exceptions
33.3.
throws
33.4.
Propagating Exceptions
33.5.
Rethrowing Exceptions
33.6.
Exception
33.7.
RuntimeException
33.8.
main
34.
Switch II
❱
34.1.
Yield
34.2.
Omitted Yield
34.3.
Exhaustiveness
34.4.
Return a Switch
Code Structure IV
35.
Multi-File Programs
❱
35.1.
The Sources folder
35.2.
The Main file
35.3.
A Second file
35.4.
File names
35.5.
The Anonymous Main Class
35.6.
Global Fields
36.
Visibility
❱
36.1.
Private Methods
36.2.
Private Fields
36.3.
Invariants
36.4.
Accessors
36.5.
Getters and Setters
37.
Static Fields
❱
37.1.
Declaration
37.2.
Initialization
37.3.
Usage
37.4.
Constants
37.5.
Controversy
37.6.
Naming
38.
Static Methods
❱
38.1.
Declaration
38.2.
Scope
38.3.
Naming
38.4.
Usage
38.5.
Math
38.6.
Factories
Data Structures & Algorithms
39.
Growable Arrays
❱
39.1.
Concept
39.2.
Simple Implementation
39.3.
Usage
39.4.
Performance Problems
39.5.
Performance Solutions
39.6.
Optimized Implementation
Interactive Programs II
40.
Command Line Arguments
❱
40.1.
Accessing Arguments
40.2.
Conventions
Code Structure IV
41.
Inner Classes
❱
41.1.
Type
41.2.
Instances
41.3.
New Operator
41.4.
Scope
41.5.
Disambiguation
41.6.
The anonymous main class
41.7.
Static Inner Classes
41.8.
Private Inner Classes
42.
Packages
❱
42.1.
Declaration
42.2.
Visibility
42.3.
Public Classes
42.4.
Fully Qualified Class Name
42.5.
Import
42.6.
The Default Package
42.7.
The Anonymous Main Class
42.8.
Public Methods
42.9.
Package-Private Methods
42.10.
Public Fields
42.11.
Package-Private Fields
42.12.
The Default Constructor
42.13.
Public Constructors
42.14.
Package-Private Constructors
42.15.
Subpackages
42.16.
Reverse Domain Name Notation
Data Types IV
43.
Records
❱
43.1.
Declaration
43.2.
The Canonical Constructor
43.3.
Component Accessors
43.4.
Component Accessor Visibility
43.5.
Printing a Record
43.6.
Check for Equality
43.7.
Return Multiple Values
43.8.
Shorthand
44.
Integers II
❱
44.1.
Integer from a String
44.2.
Integer to a String
44.3.
Base 16 Integer Literals
44.4.
Integer from a Base 16 String
44.5.
Integer to a Base 16 String
44.6.
Underscores in Integer Literals
Interactive Programs III
45.
Files
❱
45.1.
Paths
45.2.
IOException
45.3.
UncheckedIOException
45.4.
Write to a File
45.5.
Read from a File
45.6.
Create a Folder
45.7.
Challenges
Code Structure IV
46.
Object
❱
46.1.
Subtypes
46.2.
instanceof
46.3.
toString
46.4.
Override toString
46.5.
@Override
46.6.
equals and hashCode
46.7.
Override equals and hashCode
47.
Generics
❱
47.1.
Type Variables
47.2.
Naming
47.3.
Instantiation
47.4.
Inference
47.5.
Soundness
47.6.
Raw Types
48.
Interfaces
❱
48.1.
Interface Declaration
48.2.
Implementation
48.3.
@Override
48.4.
Naming
48.5.
Subtypes
48.6.
Multiple Implementations
Data Types V
49.
Time
❱
49.1.
Instant
49.2.
Duration
49.3.
LocalDate
49.4.
LocalTime
49.5.
LocalDateTime
49.6.
Time Zones
49.7.
ZonedDateTime
49.8.
OffsetDateTime
50.
ArrayList
❱
50.1.
Ubiquity
50.2.
Add an item
50.3.
Size
50.4.
Get an item
50.5.
Loop over items
50.6.
Set an item
50.7.
Remove an item
51.
🚧 (More Chapters Planned) 🚧
Light
Rust
Coal
Navy
Ayu
Modern Java
OffsetDateTime