Merge pull request #1405 from gutsy/master

Fix some grammar, spelling and indentation
This commit is contained in:
ven 2015-10-10 21:57:47 +02:00
commit 9f78b5f7e2

View File

@ -348,7 +348,7 @@ public class LearnJava {
validCodes.add("FINLAND"); validCodes.add("FINLAND");
} }
// But there's a nifty way to achive the same thing in an // But there's a nifty way to achieve the same thing in an
// easier way, by using something that is called Double Brace // easier way, by using something that is called Double Brace
// Initialization. // Initialization.
@ -358,9 +358,9 @@ public class LearnJava {
add("FINLAND"); add("FINLAND");
}} }}
// The first brace is creating an new AnonymousInnerClass and the // The first brace is creating a new AnonymousInnerClass and the
// second one declares and instance initializer block. This block // second one declares an instance initializer block. This block
// is called with the anonymous inner class is created. // is called when the anonymous inner class is created.
// This does not only work for Collections, it works for all // This does not only work for Collections, it works for all
// non-final classes. // non-final classes.
@ -489,6 +489,7 @@ public interface Digestible {
// We can now create a class that implements both of these interfaces. // We can now create a class that implements both of these interfaces.
public class Fruit implements Edible, Digestible { public class Fruit implements Edible, Digestible {
@Override @Override
public void eat() { public void eat() {
// ... // ...
@ -504,6 +505,7 @@ public class Fruit implements Edible, Digestible {
// interfaces. For example: // interfaces. For example:
public class ExampleClass extends ExampleClassParent implements InterfaceOne, public class ExampleClass extends ExampleClassParent implements InterfaceOne,
InterfaceTwo { InterfaceTwo {
@Override @Override
public void InterfaceOneMethod() { public void InterfaceOneMethod() {
} }
@ -511,6 +513,7 @@ public class ExampleClass extends ExampleClassParent implements InterfaceOne,
@Override @Override
public void InterfaceTwoMethod() { public void InterfaceTwoMethod() {
} }
} }
// Abstract Classes // Abstract Classes