Skip to content

Commit 2dd858a

Browse files
authored
Merge pull request #164 from bowbahdoe/develop
Update
2 parents 07a0478 + 11d572b commit 2dd858a

File tree

27 files changed

+95
-23
lines changed

27 files changed

+95
-23
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ Gui stuff
389389
- [Field Initialization](./classes/field_initialization.md)
390390
- [Field Access](./classes/field_access.md)
391391
- [Field Default Values](./classes/field_default_values.md)
392+
- [Multiple Instances](./classes/multiple_instances.md)
392393
- [Aliasing](./classes/aliasing.md)
393394
- [Return Multiple Values](./classes/return_multiple_values.md)
394395
- [Challenges](./classes/challenges.md)

src/arrays/set_individual_elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ IO.println(
5050
+ response[4]
5151
);
5252

53-
response[2] = "is";
53+
response[index] = "is";
5454
IO.println(
5555
response[0]
5656
+ " "

src/classes/multiple_instances.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Multiple Instances
2+
3+
If you make multiple instances of a class with `new`
4+
those classes will each have their own values for
5+
fields.
6+
7+
```java
8+
class Muppet {
9+
String name;
10+
}
11+
12+
void main() {
13+
Muppet kermit = new Muppet();
14+
kermit.name = "Kermit The Frog";
15+
16+
Muppet animal = new Muppet();
17+
animal.name = "animal";
18+
19+
// kermit and animal are distinct muppets
20+
// and thus each have their own name.
21+
IO.println(kermit.name);
22+
IO.println(animal.name);
23+
}
24+
```
25+
26+
Each instance has what we would call its own "identity."

src/conclusion/what_now.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ to in order to render websites.
117117
There are a lot of tools for this in Java. A lot a lot. I would recommend
118118
starting with the one that comes built-in: the `jdk.httpserver` module.
119119

120-
[Docs for `jdk.httpserver` here](https://docs.oracle.com/en/java/javase/25/docs/api/jdk.httpserver/module-summary.html)
120+
[Docs for `jdk.httpserver` here](https://javadoc.mccue.dev/api/jdk.httpserver/module-summary.html)
121121

122122
Then you will need to learn about SQL databases and how to query from/insert into them from Java.
123123

@@ -147,7 +147,7 @@ two paths.
147147
Path #1 is to learn Java Swing. This is an old crusty GUI framework that is kinda difficult to use
148148
but has the pro of coming with Java and being able to run on every potato in existence.
149149

150-
[Docs for `java.desktop` (Swing) here](https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/module-summary.html)
150+
[Docs for `java.desktop` (Swing) here](https://javadoc.mccue.dev/api/java.desktop/module-summary.html)
151151

152152
Path #2 is the learn JavaFX. By all accounts JavaFX is better software than Swing, but it was cursed
153153
by coming out at a point in history where desktop apps were no longer big business to develop. It

src/documentation/challenges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ Fix these by documenting that code enough that `javadoc` no longer gives you war
1919

2020
## Challenge 3.
2121

22-
Read the [documentation for java.util.StringJoiner](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/StringJoiner.html).
22+
Read the [documentation for java.util.StringJoiner](https://javadoc.mccue.dev/api/java.base/java/util/StringJoiner.html).
2323

2424
If you can, alter one of your projects to use it.

src/documentation/javadoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ javadoc \
1717
This will produce a directory full of HTML files that contain all
1818
the documentation from the specified modules.
1919

20-
This is what is used to make [the official Java documenation](https://docs.oracle.com/en/java/javase/25/docs/api/index.html) as well as at least part of the documentation for most Java libraries.
20+
This is what is used to make [the official Java documenation](https://javadoc.mccue.dev/api/index.html) as well as at least part of the documentation for most Java libraries.
2121

2222
[^theme]: As is a theme with command-line tools

src/first_steps.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ You should get in the habit of, whenever you see some bit of code, trying to phy
6262
tweak it, and play with it.
6363

6464
So try playing around with this program. If you actively engage then you will retain information better.
65+
66+
A lot of the code samples in the book are runnable in your browser. Hover
67+
your mouse on the one above. You should see a run button in the top right.

src/hash_maps/challenges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Main {
9090
```
9191

9292
If you feel like this is hard to do with just `.put` and `.get`, you can
93-
check for [other methods on HashMap that can help you](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/HashMap.html).
93+
check for [other methods on HashMap that can help you](https://javadoc.mccue.dev/api/java.base/java/util/HashMap.html).
9494

9595
## Challenge 3.
9696

src/interfaces/cat_dog.mp4

4.98 MB
Binary file not shown.

src/interfaces/multiple_implementations.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ void main() {
5050
barkAndFetch(new Cat());
5151
}
5252
```
53+
54+
<details>
55+
<summary>Think a cat won't behave like a dog?</summary>
56+
<video style="height: 600px" autoplay muted controls src="/interfaces/cat_dog.mp4"></video>
57+
</details>

0 commit comments

Comments
 (0)