Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
480d678
Update initialization.md
bowbahdoe Nov 11, 2024
a8996c9
Add footnote softening the use of "wrong"
bowbahdoe Nov 12, 2024
d704210
Merge branch 'Together-Java:develop' into develop
bowbahdoe Feb 14, 2025
6e163e0
Explain backslash and forward slash
bowbahdoe Feb 14, 2025
a486cf4
Resolve #54
bowbahdoe Feb 14, 2025
63770df
Use IO.readln
bowbahdoe Feb 14, 2025
4d5a97e
Add OffsetDateTime chapter
bowbahdoe Feb 14, 2025
eea0459
Chapter on Date
bowbahdoe Feb 14, 2025
1af9198
Switch and recursion
bowbahdoe Feb 15, 2025
b420f22
Loops III
bowbahdoe Feb 16, 2025
101ffc7
Checkpoint
bowbahdoe Feb 22, 2025
52b9365
More reflection
bowbahdoe Feb 23, 2025
be430e4
checkpoint
bowbahdoe Feb 24, 2025
4ebd82e
Numerics
bowbahdoe Mar 1, 2025
f6a1b4b
IO println
bowbahdoe May 19, 2025
76b013a
Checkpoint
bowbahdoe May 20, 2025
9aa0b3c
Update other prints
bowbahdoe May 29, 2025
0ccc0d4
..
bowbahdoe Jun 8, 2025
6adaacc
Remove junk files
bowbahdoe Jul 16, 2025
c304ca2
Merge branch 'develop' into develop
bowbahdoe Jul 16, 2025
3b20e09
Update code runner
bowbahdoe Aug 14, 2025
41c8edd
Update switch
bowbahdoe Aug 14, 2025
a7dcf5c
Merge branch 'develop' into develop
bowbahdoe Aug 14, 2025
bd337ef
...
bowbahdoe Aug 14, 2025
67ab23e
calorie tracker
bowbahdoe Aug 15, 2025
5c0cf01
Update calorie_tracker.md
bowbahdoe Aug 15, 2025
af11509
Update calorie_tracker.md
bowbahdoe Aug 15, 2025
73b34b2
add problem statement
bowbahdoe Aug 15, 2025
4864e95
ASCII Art
bowbahdoe Aug 15, 2025
e0cbd79
Point of Sale System
bowbahdoe Aug 15, 2025
50a32b0
Fix up standard input sections
bowbahdoe Aug 16, 2025
b457d9a
...
bowbahdoe Aug 16, 2025
ce41fda
Bad project
bowbahdoe Aug 17, 2025
2a440b2
Update buy_now_pay_later.md
bowbahdoe Aug 17, 2025
8e5a323
Data vis
bowbahdoe Aug 17, 2025
b8a5e11
Update data_visualization.md
bowbahdoe Aug 17, 2025
d9656e8
Update buy_now_pay_later.md
bowbahdoe Aug 17, 2025
f37f2c9
Update buy_now_pay_later.md
bowbahdoe Aug 17, 2025
3a345b1
Update data_visualization.md
bowbahdoe Aug 17, 2025
b61d1e7
Challenges up through static methods
bowbahdoe Aug 17, 2025
f4408a0
cli and array challenges
bowbahdoe Aug 17, 2025
5c513b2
Inner classes challenges
bowbahdoe Aug 17, 2025
c69309a
More challenges
bowbahdoe Aug 17, 2025
9cdaa5b
integer challenges
bowbahdoe Aug 17, 2025
7fc5dc6
Update buy_now_pay_later.md
bowbahdoe Aug 17, 2025
17e63a4
Update SUMMARY.md
bowbahdoe Aug 18, 2025
9c8a5a9
Object challenges
bowbahdoe Aug 18, 2025
fe78625
Time challenges
bowbahdoe Aug 18, 2025
7dc4583
Hash map and array list challenges
bowbahdoe Aug 18, 2025
8010ef8
Update challenges.md
bowbahdoe Aug 19, 2025
32ee94d
more challenges
bowbahdoe Aug 19, 2025
08dc545
Code Stuff
bowbahdoe Aug 20, 2025
1ed53b5
Fix array challenges
bowbahdoe Aug 20, 2025
ce3d232
Update challenges.md
bowbahdoe Aug 20, 2025
2659771
...
bowbahdoe Aug 20, 2025
caf3b12
commas
bowbahdoe Aug 20, 2025
466e267
more challenges
bowbahdoe Aug 20, 2025
ba8dde6
Update character.md
bowbahdoe Aug 20, 2025
9a3714b
Packaging, Compilation, and Just
bowbahdoe Aug 21, 2025
4a22e72
Java doc
bowbahdoe Aug 21, 2025
d67910f
...
bowbahdoe Aug 21, 2025
626bc8d
Challenges
bowbahdoe Aug 22, 2025
3ad07cd
elmo full name
bowbahdoe Aug 22, 2025
862cd46
Update main.md
bowbahdoe Aug 22, 2025
d9aeb3d
Update return_in_void_methods.md
bowbahdoe Aug 22, 2025
d4046f2
Modulese
bowbahdoe Aug 23, 2025
fc87bda
music project
bowbahdoe Aug 23, 2025
45a4e5c
Update music_maker.md
bowbahdoe Aug 23, 2025
eb7eb00
Section headings
bowbahdoe Aug 23, 2025
4cc7c70
more
bowbahdoe Aug 23, 2025
5b9654e
More images
bowbahdoe Aug 23, 2025
ebc94a0
More drawings
bowbahdoe Aug 23, 2025
8b826e4
2/3rds
bowbahdoe Aug 23, 2025
63eae18
Update interfaces.md
bowbahdoe Aug 23, 2025
fdef434
more art
bowbahdoe Aug 23, 2025
cdc57dd
more ART!
bowbahdoe Aug 24, 2025
3303b10
remove repl.it
bowbahdoe Aug 24, 2025
5ed23fe
fix img
bowbahdoe Aug 24, 2025
47cab16
Update chained_comparisons.md
bowbahdoe Aug 24, 2025
4fa9402
Update size.md
bowbahdoe Aug 24, 2025
994f10e
Update limits.md
bowbahdoe Aug 24, 2025
f1c8a32
Use coordinates of studio where muppets treasure island was filmed
bowbahdoe Aug 24, 2025
ac2ba0a
Update equality.md
bowbahdoe Aug 24, 2025
25d94ed
Update getting_started.md
bowbahdoe Aug 24, 2025
655ae66
Delete Screenshot 2025-08-23 at 9.17.49 PM.png
bowbahdoe Aug 24, 2025
7e9bd96
lambdas
bowbahdoe Aug 25, 2025
ea90b21
more streams
bowbahdoe Aug 25, 2025
594388c
Update challenges.md
bowbahdoe Aug 25, 2025
a283676
streams
bowbahdoe Aug 25, 2025
b18750c
Update semicolon.md
bowbahdoe Aug 25, 2025
9055d3b
regex start
bowbahdoe Aug 25, 2025
2aad072
Update what_now.md
bowbahdoe Aug 25, 2025
00d80a2
mascots in what now
bowbahdoe Aug 25, 2025
2a4a09b
Update what_now.md
bowbahdoe Aug 25, 2025
9b02a67
Update what_now.md
bowbahdoe Aug 25, 2025
e136a3f
..
bowbahdoe Aug 26, 2025
43c77ff
Merge branch 'develop' into develop
bowbahdoe Aug 26, 2025
68d0920
Merge branch 'Together-Java:develop' into develop
bowbahdoe Aug 26, 2025
4eae514
Update SUMMARY.md
bowbahdoe Aug 26, 2025
029877b
Update first_steps.md
bowbahdoe Aug 26, 2025
ed00e82
Update first_steps.md
bowbahdoe Aug 26, 2025
305ce3c
Update challenges.md
bowbahdoe Aug 26, 2025
b7e5141
Update challenges.md
bowbahdoe Aug 26, 2025
1c467c1
Update challenges.md
bowbahdoe Aug 26, 2025
386e1da
Update variables.md
bowbahdoe Aug 26, 2025
c174faf
Update challenges.md
bowbahdoe Aug 26, 2025
3f8d8bb
Update challenges.md
bowbahdoe Aug 26, 2025
f3730bc
Grammar
bowbahdoe Aug 26, 2025
400be14
fixed
bowbahdoe Aug 27, 2025
f7c1bdd
Update purpose.md
bowbahdoe Aug 27, 2025
13889b3
Update challenges.md
bowbahdoe Aug 27, 2025
387ee31
Update what_now.md
bowbahdoe Aug 27, 2025
f9971ac
Update what_now.md
bowbahdoe Aug 27, 2025
f4ce614
Update book.toml
bowbahdoe Aug 27, 2025
adc3874
Update book.toml
bowbahdoe Aug 27, 2025
57b0704
Merge remote-tracking branch 'upstream/develop' into develop
bowbahdoe Aug 27, 2025
d43e586
Update first_steps.md
bowbahdoe Aug 27, 2025
bcc0622
Merge remote-tracking branch 'upstream/develop' into develop
bowbahdoe Aug 31, 2025
c4d0fe7
Merge remote-tracking branch 'upstream/develop' into develop
bowbahdoe Sep 2, 2025
ba919df
Merge remote-tracking branch 'upstream/develop' into develop
bowbahdoe Sep 3, 2025
83fb113
Merge remote-tracking branch 'upstream/develop' into develop
bowbahdoe Sep 3, 2025
d81f4f8
Update offset_date_time.md
bowbahdoe Sep 3, 2025
c72bfdc
Create tic_tac_toe.md
bowbahdoe Sep 3, 2025
62d4a93
Committing to new start
bowbahdoe Sep 16, 2025
8805b9b
...
bowbahdoe Sep 16, 2025
c139ef5
windows instructions
bowbahdoe Sep 16, 2025
7f62007
spelling
bowbahdoe Sep 16, 2025
3a47b12
Merge branch 'Together-Java:develop' into develop
bowbahdoe Sep 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ mathjax-support = true
additional-css = ["ferris.css"]
additional-js = ["ferris.js"]
heading-split-level = 2
default-theme = "light"
preferred-default-theme = "light"

[output.html.fold]
enable = false # whether or not to enable section folding
Expand Down
96 changes: 60 additions & 36 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,53 @@ Intro to testing
Gui stuff
-->

# Modern Java

- [Prelude](./prelude.md)
- [Asking for Help](./prelude/asking_for_help.md)
- [Toy Problems](./prelude/toy_problems.md)
- [Lies](./prelude/lies.md)
- [AI](./prelude/ai.md)
- [Java](./prelude/java.md)
- [Getting Started](./getting_started.md)

# The Computing Environment

- [Hardware](./hardware.md)
- [CPU](./hardware/cpu.md)
- [RAM](./hardware/ram.md)
- [Hard Drives](./hardware/hard_drives.md)
- [Motherboard](./hardware/motherboard.md)
- [Operating Systems](./operating_systems.md)
- [Personal Computers](./operating_systems/personal_computers.md)
- [Servers](./operating_systems/servers.md)
- [Mobile Phones](./operating_systems/mobile_phones.md)
- [Game Consoles](./operating_systems/game_consoles.md)
- [Abstractions](./operating_systems/abstractions.md)
- [Defaults](./operating_systems/defaults.md)

# Modern Java

- [Set Up Your Computer](./text_editors/set_up_your_computer.md)
- [Text Editors](./text_editors.md)
- [IDEs](./text_editors/ides.md)
- [VSCodium](./text_editors/vscodium.md)
- [Install VSCodium](./text_editors/install_vscodium.md)
- [Install Java](./text_editors/install_java.md)
- [The Terminal](./the_terminal.md)
- [Bash](./the_terminal/bash.md)
- [Windows Subsystem for Linux](./the_terminal/windows_subsystem_for_linux.md)
- [Chromebooks and School Computers](./the_terminal/chromebooks_and_school_computers.md)
- [Commands](./the_terminal/commands.md)
- [Directories](./the_terminal/directories.md)
- [Listing Files](./the_terminal/listing_files.md)
- [Creating Directories](./the_terminal/creating_directories.md)
- [Changing Directories](./the_terminal/changing_directories.md)
- [Creating Files](./the_terminal/creating_files.md)
- [Run Java Programs](./the_terminal/run_java_programs.md)
- [Getting Used to it](./the_terminal/getting_used_to_it.md)
- [Challenges](./the_terminal/challenges.md)


<!-- - [Getting Started](./getting_started.md) -->
- [First Steps](./first_steps.md)
- [Comments](./first_steps/comments.md)
- [Semicolons](./first_steps/semicolon.md)
Expand Down Expand Up @@ -445,7 +483,7 @@ Gui stuff
# Projects

<!-- chicken nugget number type things come up when dispensing change -->
- [Tic-Tac-Toe]()
- [Tic-Tac-Toe](./projects/tic_tac_toe.md)


# Concepts
Expand All @@ -458,35 +496,6 @@ Gui stuff
- [Practice](./code_is_read_more_than_written/practice.md)



# The Computing Environment

- [Hardware](./hardware.md)
- [CPU](./hardware/cpu.md)
- [RAM](./hardware/ram.md)
- [Hard Drives](./hardware/hard_drives.md)
- [Motherboard](./hardware/motherboard.md)
- [Operating Systems](./operating_systems.md)
- [Personal Computers](./operating_systems/personal_computers.md)
- [Servers](./operating_systems/servers.md)
- [Mobile Phones](./operating_systems/mobile_phones.md)
- [Game Consoles](./operating_systems/game_consoles.md)
- [Abstractions](./operating_systems/abstractions.md)
- [Defaults](./operating_systems/defaults.md)
- [The Terminal](./the_terminal.md)
- [Bash](./the_terminal/bash.md)
- [Windows Subsystem for Linux](./the_terminal/windows_subsystem_for_linux.md)
- [Chromebooks and School Computers](./the_terminal/chromebooks_and_school_computers.md)
- [Commands](./the_terminal/commands.md)
- [Directories](./the_terminal/directories.md)
- [Listing Files](./the_terminal/listing_files.md)
- [Creating Directories](./the_terminal/creating_directories.md)
- [Changing Directories](./the_terminal/changing_directories.md)
- [Creating Files](./the_terminal/creating_files.md)
- [Run Java Programs](./the_terminal/run_java_programs.md)
- [Getting Used to it](./the_terminal/getting_used_to_it.md)


# Control Flow IV

- [Exceptions II](./exceptions_ii.md)
Expand Down Expand Up @@ -551,7 +560,7 @@ Gui stuff
- [Optimized Implementation](./growable_arrays/optimized_implementation.md)
- [Challenges](./growable_arrays/challenges.md)

# Interactive Programs II
# Interactive Programs III

- [Command Line Arguments](./command_line_arguments.md)
- [Accessing Arguments](./command_line_arguments/accessing_arguments.md)
Expand Down Expand Up @@ -613,7 +622,7 @@ Gui stuff
- [Challenges](./integers_ii/challenges.md)


# Interactive Programs III
# Interactive Programs IV

- [Files](./files.md)
- [Paths](./files/paths.md)
Expand Down Expand Up @@ -874,10 +883,9 @@ Make them do one. -->
- [Arguments](./lambdas/arguments.md)
- [Return](./lambdas/return.md)
- [Method References](./lambdas/method_references.md)
- [Constructor References](./lambdas/constructor_references.md)
- [Inference](./lambdas/inference.md)
- [Built-In Functional Interfaces](./lambdas/built_in_functional_interfaces.md)
- [Runnable](./lambdas/runnable.md)
- [Function](./lambdas/function.md)
- [Checked Exceptions](./lambdas/checked_exceptions.md)
- [Challenges](./lambdas/challenges.md)

Expand Down Expand Up @@ -953,7 +961,11 @@ TODO: Wait for hermetic java
- [Collectors](./streams/collectors.md)
- [Purpose](./streams/purpose.md)
- [Challenges](./streams/challenges.md)


<!--
Make a challenge where the solution is to write normal code.

- [Regular Expressions 🚧](./regular_expressions.md)
- [Theoretical Basis](./regular_expressions/theoretical_basis.md)
- [Pattern](./regular_expressions/pattern.md)
Expand All @@ -964,14 +976,26 @@ TODO: Wait for hermetic java
- [Matcher]()
- [Pathological Cases]()
- [Power]()

# Interactive Programs IV

- [Files II](./files_ii.md)
- [List Files](./files_ii/list_files.md)
- [Read Lines](./files_ii/read_lines.md)
- [InputStream](./files_ii/input_stream.md)
- [OutputStream](./files_ii/output_stream.md)
- [Reader](./files_ii/reader.md)
- [Writer](./files_ii/writer.md)
-->


# Conclusion

- [What Now?](./conclusion/what_now.md)


<!--

- [Strings III 🚧]()

Streams II
Expand Down
16 changes: 10 additions & 6 deletions src/conclusion/what_now.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ most employable one of the many HTTP server options out there.
### Desktop Applications

If you want to learn how to make desktop applications in Java you have basically
three paths.
two paths.

Path #1 is to learn Java Swing. This is an old crusty GUI framework that is kinda difficult to use
but has the pro of coming with Java and being able to run on every potato in existence.

[Docs for `java.desktop` (Swing) here](https://docs.oracle.com/en/java/javase/24/docs/api/jdk.httpserver/module-summary.html)
[Docs for `java.desktop` (Swing) here](https://docs.oracle.com/en/java/javase/24/docs/api/java.desktop/module-summary.html)

Path #2 is the learn JavaFX. By all accounts JavaFX is better software than Swing, but it was cursed
by coming out at a point in history where desktop apps were no longer big business to develop. It
Expand Down Expand Up @@ -187,7 +187,8 @@ learned JavaScript that is a good one to touch next.

There are languages out there like TypeScript that compile to JavaScript -
and you can find some projects out there that do much the same for Java -
but just practically speaking learning JavaScript
but just practically speaking learning JavaScript is going to be something
you have to do at some point if you get into making websites.

### C#

Expand Down Expand Up @@ -226,10 +227,10 @@ you do to make a full app in it, but it can't hurt.

[Kotlin Android Tutorial here](https://kotlinlang.org/docs/android-overview.html)

If you want to make Desktop or Mobile apps in Kotlin it is probably also worth checking out
Jetpack Compose.
If you want to make Desktop, Mobile, or Web apps in Kotlin it is probably also worth checking out
Jetbrains Compose Multiplatfrom.

[Getting Started for Jetpack Compose here](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-create-first-app.html)
[Getting Started for Jetbrains Compose Multiplatfrom here](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-create-first-app.html)


### Others
Expand Down Expand Up @@ -261,4 +262,7 @@ context for quite yet:

* Rust
* Zig
* Clojure


[^wasm]: Fight me, WebAssembly fans.
1 change: 1 addition & 0 deletions src/easy_vs_simple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Easy vs. Simple
2 changes: 1 addition & 1 deletion src/exceptions_ii/unchecked_exceptions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unchecked Exceptions

When a part of your code might throw a "unchecked" exception, other
When a part of your code might throw an "unchecked" exception, other
parts of your code do not need to account for that possibility.

```java
Expand Down
1 change: 1 addition & 0 deletions src/files_ii.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Files II
1 change: 1 addition & 0 deletions src/files_ii/challenges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Challenges
1 change: 1 addition & 0 deletions src/files_ii/input_stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# InputStream
1 change: 1 addition & 0 deletions src/files_ii/lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Lines
1 change: 1 addition & 0 deletions src/files_ii/list_directory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Paths
1 change: 1 addition & 0 deletions src/files_ii/list_files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# List Files
1 change: 1 addition & 0 deletions src/files_ii/list_files_in_a_directory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Paths
1 change: 1 addition & 0 deletions src/files_ii/output_stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# OutputStream
1 change: 1 addition & 0 deletions src/files_ii/paths.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Paths
1 change: 1 addition & 0 deletions src/files_ii/read_lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Read Lines
1 change: 1 addition & 0 deletions src/files_ii/reader.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Reader
1 change: 1 addition & 0 deletions src/files_ii/writer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Writer
4 changes: 2 additions & 2 deletions src/first_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="/first_steps/header.png" height="200px"/>


If you made it through the [Getting Started section](./getting_started/hello_world.md) you've successfully run this program.
If you made it through the ["Set Up Your Computer" section](./text_editors/set_up_your_computer.md) you've successfully run this program.

```java
void main() {
Expand Down Expand Up @@ -36,7 +36,7 @@ IO.println("Hello, World!");

This bit of magic here - `IO.println` - is a "statement" that "prints" the text inside the `(` and `)` as well as a "new line" to the screen.

**print** with new **l**i**n**e.
The "`IO`" part stands for "Input/Output" then it is **print** with new **l**i**n**e.

If you were to replace it with `IO.print`, then the output would lack that new line. This makes the following program be functionally identical to the first.

Expand Down
20 changes: 19 additions & 1 deletion src/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Getting Started

There are a lot of ways to "get set up" to run Java code.
There are a lot of ways to "get set up" to run Java code.



For the first chunk of this book it will only matter that you have the
ability to run Java code. The guides below will be aiming to get you
to that point.

After the section

## Chromebooks / Mobile Phones



One is to get set up "for real." This means Java is fully set up on your system
and all the comman

For at least the first chunk of this, you should be able to get away with using
the editor on [https://run.mccue.dev](https://run.mccue.dev). That might be the easiest.
Expand All @@ -21,6 +36,9 @@ Download the "JDK MSI" from [adoptium.net](https://adoptium.net/temurin/releases

Run the installer, selecting all the default options.

Then you should download


## Mac OS

Download the "JDK .pkg" from [adoptium.net](https://adoptium.net/temurin/releases/?version=25&os=mac).
Expand Down
4 changes: 2 additions & 2 deletions src/hardware.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Hardware
<img src="/hardware/header.png" height="200px"/>

That was a long stretch of Java, so I think you've earned a bit of a detour into
Before we get into Java, It might be helpful to take a detour into
general computing knowledge.

I won't be offended if you skim or skip these sections. Depending on who you are,
I won't be offended if you skim or skip this and the next section. Depending on who you are,
this might be a bit obvious.

First lets cover hardware. The actual physical components that make up your computer.
2 changes: 1 addition & 1 deletion src/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Generics let you write code that doesn't care
what is different between different things - you would accept a `String`
or an `Integer`, doesn't matter what is diferent between them.
or an `Integer`, doesn't matter what is different between them.

Interfaces do a related thing. They let you write code that takes advantage
of commonalities.
Expand Down
2 changes: 1 addition & 1 deletion src/lambdas.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Band {
void playHitSong();
}

class Starcadian implements Bank {
class Starcadian implements Band {
@Override
public void playHitSong() {
IO.println("ultralove");
Expand Down
25 changes: 25 additions & 0 deletions src/lambdas/constructor_references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Constructor References

You can make a reference to the constructor
of a class by using `::new`.

```java,no_run
// interface Supplier<T> {
// T get();
// }

Supplier<ArrayList<String>> listSupplier =
ArrayList::new;
```

This will try and select a constructor overload that
matches the method expected on the interface.

If you need to pass arguments to the constructor then
you should use a regular lambda.

```java,no_run
Supplier<ArrayList<String>> listSupplier = () -> {
return new ArrayList<>(10);
};
```
2 changes: 1 addition & 1 deletion src/packaging/jar_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ just that at a high level it's all just files in a ZIP.
[^compression]: This bundling up also generally includes "compression," where
the single file might be smaller than the combined sizes of its components. Most people don't
need to think about this nowadays. Class files are small and hard drives are big.
I say that knowing full well that 145GB of the 500GB hard drive my work laptop is Baldurs Gate 3.
I say that knowing full well that 145GB of the 500GB hard drive on my work laptop is Baldurs Gate 3.
I have 4GB left.
2 changes: 1 addition & 1 deletion src/projects/buy_now_pay_later.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
People exchange money for goods and/or services.

Some of these purchases are non-essential. This means that they are,
strictly speaking, optional. Ordering extra guacamole at a restraunt,
strictly speaking, optional. Ordering extra guacamole at a restaurant,
buying a brand new pair of shoes, and buying a diamond ring are all
examples of non-essential spending.

Expand Down
Loading