Skip to content

Fix/grammar #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/arrays_ii/initialization_with_size.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Initializion with Size
# Initialization with Size

The Nintendo GameBoy had a screen resolution of 160 x 144.
To store the value of each pixel[^bw] you would need an array 23,040 items
long.

To support this without you writing the word `false` 23,040 times,
arrays can be made with just by giving a size and skipping the initializer.
arrays can be made just by giving a size and skipping the initializer.

```java,no_run
boolean[] pixels = new boolean[23040];
Expand All @@ -14,4 +14,4 @@ boolean[] pixels = new boolean[23040];
So you have to say `new` followed by the type of element in the array, `[`, the size of the array and `]`.


[^bw]: The original GameBoy wasn't actually just black and white. It supported 7 shades of gray, so a `boolean` wouldn't technically to be enough to represent a pixel's state. You'd have to use something with at least 8 states, not just 2.
[^bw]: The original GameBoy wasn't actually just black and white. It supported 7 shades of gray, so a `boolean` wouldn't technically be enough to represent a pixel's state. You'd have to use something with at least 8 states, not just 2.
2 changes: 1 addition & 1 deletion src/classes/challenges.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SquareRoot {
double negativeRoot;
}

void squareRoot(double value) {
SquareRoot squareRoot(double value) {
// -----------
// CODE HERE
// -----------
Expand Down
2 changes: 1 addition & 1 deletion src/classes/field_access.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Field Access

You can access the value of any field on a class by writing the name of a variable holding an instance
You can access the value of any field in a class by writing the name of a variable holding an instance
of that class, `.`, then the name of that field.

```java
Expand Down
2 changes: 1 addition & 1 deletion src/classes/field_initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can set an initial value for a field in a few ways.

One is to access to assign the field directly on the instance created.
One is to assign the field directly on the instance created.

```java
class Muppet {
Expand Down
2 changes: 1 addition & 1 deletion src/classes/instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void main() {
}
```

Very similarly to arrays, the output from printing an instance of a class might seem like gibberish (`Main$Muppet@1be6f5c3`).
Very similar to arrays, the output from printing an instance of a class might seem like gibberish (`Main$Muppet@1be6f5c3`).
You will learn how to make it nicer later.

[^var]: I haven't used it in many code samples thus far, but if you remember `var` this is one of the times
Expand Down
2 changes: 1 addition & 1 deletion src/instance_methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ class Muppet {
We call these instance methods because you need an instance of the class in order
to call the method.

[^kermitangry]: If you haven't seen the muppets this might have go over your head,
[^kermitangry]: If you haven't seen the muppets this might go over your head,
but Kermit [randomly gets really mad.](https://www.youtube.com/watch?v=SVDgHEg2jnY)