Skip to content

Commit be430e4

Browse files
committed
checkpoint
1 parent 52b9365 commit be430e4

24 files changed

+589
-14
lines changed

src/SUMMARY.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
- [Initialization with new](./arrays/initialization_with_new.md)
139139
- [Challenges](./arrays/challenges.md)
140140

141+
# Projects
142+
143+
- [The Boston Molasses Disaster Game]() <!-- Make sure they know it was because of deregulation -->
144+
141145
# Control Flow II
142146

143147
- [Loops II](./loops_ii.md)
@@ -172,7 +176,6 @@
172176
- [Challenges](./methods/challenges.md)
173177

174178
- [Arguments](./arguments.md)
175-
176179
- [Declaration](./arguments/declaration.md)
177180
- [Invocation with Arguments](./arguments/invocation_with_arguments.md)
178181
- [Reassignment](./arguments/reassignment.md)
@@ -192,6 +195,10 @@
192195
- [Unreachable Statements](./return_values/unreachable_statements.md)
193196
- [Challenges](./return_values/challenges.md)
194197

198+
# Projects
199+
200+
- [Tic-Tac-Toe]()
201+
195202
# Data Types III
196203

197204
- [null](./null.md)
@@ -215,6 +222,11 @@
215222
- [Populate Arrays](./arrays_ii/populate_arrays.md)
216223
- [Challenges](./arrays_ii/challenges.md)
217224

225+
# Projects II
226+
227+
<!-- https://michaelxing.com/UltimateTTT/v3/ -->
228+
- [Ultimate Tic-Tac-Toe]()
229+
218230
# Code Structure II
219231

220232
- [Classes](./classes.md)
@@ -597,6 +609,15 @@ Make them do one. -->
597609
- [Set]()
598610
- [Arrays](./collections/arrays.md) <!-- Odd duck out, Arrays.asList -->
599611
- [Multi-Dimensional Arrays](./multi_dimensional_arrays.md)
612+
- [Declaration](./multi_dimensional_arrays/declaration.md)
613+
- [Array Initializers](./multi_dimensional_arrays/array_initializers.md)
614+
- [Initialization with new](./multi_dimensional_arrays/initialization_with_new.md)
615+
- [Access Individual Elements](./multi_dimensional_arrays/access_individual_elements.md)
616+
- [Set Individual Elements](./multi_dimensional_arrays/set_individual_elements.md)
617+
- [Initialization with Size](./multi_dimensional_arrays/initialize_with_size.md)
618+
- [Default Values](./multi_dimensional_arrays/default_values.md)
619+
- [Populate Values](./multi_dimensional_arrays/populate_values.md)
620+
- [Ragged Arrays](./multi_dimensional_arrays/ragged_arrays.md)
600621

601622
# Metaprogramming
602623

@@ -609,7 +630,9 @@ Make them do one. -->
609630
- [Get all Methods](./reflection/get_all_methods.md)
610631
- [Get a Method](./reflection/get_a_method.md)
611632
- [Invoke a Method](./reflection/invoke_a_method.md)
612-
- [Get a Constructor]()
633+
- [Get a Constructor](./reflection/get_a_constructor.md)
634+
- [Get all Constructors](./reflection/get_all_constructors.md)
635+
- [Invoke a Constructor](./reflection/invoke_a_constructor.md)
613636

614637
- [Annotations](./annotations.md)
615638
- [Declaration](./annotations/declaration.md)
@@ -621,8 +644,8 @@ Make them do one. -->
621644
- [@Retention](./annotations/retention.md)
622645
- [Reflective Access](./annotations/reflective_access.md)
623646
- [@Override](./annotations/override.md)
624-
- [@Deprecated](./annotations/deprecated)
625-
- [@Repeatable]() <!-- Note: When doing javadoc, write about @Documented -->
647+
<!-- - [@Deprecated](./annotations/deprecated)
648+
- [@Repeatable]()Note: When doing javadoc, write about @Documented -->
626649

627650
# Concepts III
628651

@@ -634,14 +657,26 @@ Make them do one. -->
634657
- [Elaboration](./abbreviations/elaboration.md)
635658

636659
# Code Structure VII
637-
- [Interfaces II](./interface_extension.md)
660+
- [Interfaces II](./interfaces_ii.md)
638661
- [Default Methods]()
639662
- [Interface Extension]()
640663
- [Static Methods]()
641664
- [Private Static Methods]()
642665
- [Class Extension](./class_extension.md)
643666
- [Abstract Classes](./abstract_classes.md)
644667

668+
# Data Types IV
669+
670+
- [Niche Numerics]()
671+
- [byte]()
672+
- [short]()
673+
- [long]()
674+
- [Unsigned Operations]()
675+
676+
# Code Structure VIII
677+
678+
- [Modules](./modules.md)
679+
645680
<!--- [HashMap](./hash_map.md)
646681
647682

src/classes/the_meaning_of_the_word_class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ it stores. The `String` class would specify all of that.[^heady]
1111

1212
[^idiot]: What an [idiot](https://www.shardcore.org/spx/2015/05/15/diogenes-and-the-chicken/)
1313

14-
[^heady]: If thats a bit too heady of an explanation don't fret. You will likely get it intuitively eventually.
14+
[^heady]: If that's a bit too heady of an explanation don't fret. You will likely get it intuitively eventually.
1515
There are like 50 different ways to explain it and eventually one will land for you.

src/collections.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
Arrays, `ArrayList`, and `HashMap` are all "collections"
44
of objects. Importantly, they also aren't the only possible
5-
kinds of collections.
5+
kinds of collections.
6+

src/collections/arrays.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Arrays
22

3-
Arrays are the odd duck out in the world of collections. They are basically a `List` but aren't `List`s.
3+
Arrays are the odd duck out in the world of collections. They are basically a `List` but aren't `List`s.[^history]
44

55
You can make a `List` which is a view over an array with `Arrays.asList`.
66

@@ -66,4 +66,7 @@ class Main {
6666
furnitureList.add("Shelf");
6767
}
6868
}
69-
```
69+
```
70+
71+
[^history]: Arrays are unique beasts. This is true both in Java the language and in the virtual machine Java code runs on.
72+
This is partially attributable to arrays coming first in the history - `List` and friends were not in the first version of Java.

src/inner_classes/new_operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ something like `new ClassName()`, you can make an instance of an
99
inner class by using `.new` on a variable that holds an instance
1010
of the containing class.
1111

12-
Thats a confusing verbal description, but it kinda makes sense once you see it.
12+
That's a confusing verbal description, but it kinda makes sense once you see it.
1313

1414
```java
1515
class Car {

src/interfaces_ii.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Interfaces II
2+

src/modules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Modules
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Access Individual Elements
2+
3+
Accessing an element in a multi-dimensional array works the same as
4+
accessing the elements of a one-dimensional array.
5+
6+
Each time you index into it you will get out another array, so you just keep writing `[]` until
7+
you've drilled down to an individual element.
8+
9+
```java
10+
~void main() {
11+
String[][] ticTacToe = {
12+
{ "O", "", "O" },
13+
{ "X", "O", "X" },
14+
{ "O", "X", "X" }
15+
}
16+
17+
System.out.println(ticTacToe[2][1]);
18+
19+
// This is equivalent to the above
20+
String[] row = ticTacToe[2];
21+
System.out.println(row[1]);
22+
~}
23+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Array Initializers
2+
3+
To give an initial value to a multi-dimensional array you can use multiple nested
4+
array initializers.
5+
6+
These are the same as normal array initializers but with potentially more initializers inside.[^moray]
7+
8+
```java,no_run
9+
String[][] ticTacToe = {
10+
{ "O", "", "O" },
11+
{ "X", "O", "X" },
12+
{ "O", "X", "X" }
13+
}
14+
```
15+
16+
[^moray]: When array initizalize and more initialize inside that's a moray.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Declaration
2+
3+
Declaring a multi-dimensional array is similar to declaring a normal array.
4+
5+
The difference is that instead of only one `[]` following the type declaration, you add an extra `[]`
6+
for each extra dimension.
7+
8+
```java,no_run
9+
// 2d array
10+
int[][] grid;
11+
// 3d array
12+
int[][][] cube;
13+
// 4d array
14+
int[][][][] hypercube;
15+
// ... and so on
16+
```

0 commit comments

Comments
 (0)