diff --git a/src/arrays_ii/initialization_with_size.md b/src/arrays_ii/initialization_with_size.md index e076ff4c..109c9f7e 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 d7bf2207..94fbdeed 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 15706c6d..e7975fed 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 0a3461f7..43394880 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 2131840c..2737938c 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 e499cb06..2cc4255c 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