diff --git a/src/arrays_ii/initialization_with_size.md b/src/arrays_ii/initialization_with_size.md index e076ff4..109c9f7 100644 --- a/src/arrays_ii/initialization_with_size.md +++ b/src/arrays_ii/initialization_with_size.md @@ -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]; @@ -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. diff --git a/src/classes/challenges.md b/src/classes/challenges.md index d7bf220..94fbdee 100644 --- a/src/classes/challenges.md +++ b/src/classes/challenges.md @@ -105,7 +105,7 @@ class SquareRoot { double negativeRoot; } -void squareRoot(double value) { +SquareRoot squareRoot(double value) { // ----------- // CODE HERE // ----------- diff --git a/src/classes/field_access.md b/src/classes/field_access.md index 15706c6..e7975fe 100644 --- a/src/classes/field_access.md +++ b/src/classes/field_access.md @@ -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 diff --git a/src/classes/field_initialization.md b/src/classes/field_initialization.md index 0a3461f..4339488 100644 --- a/src/classes/field_initialization.md +++ b/src/classes/field_initialization.md @@ -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 { diff --git a/src/classes/instances.md b/src/classes/instances.md index 2131840..2737938 100644 --- a/src/classes/instances.md +++ b/src/classes/instances.md @@ -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 diff --git a/src/instance_methods.md b/src/instance_methods.md index e499cb0..2cc4255 100644 --- a/src/instance_methods.md +++ b/src/instance_methods.md @@ -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) \ No newline at end of file pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy