mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 01:51:38 +00:00
Merge pull request #1405 from gutsy/master
Fix some grammar, spelling and indentation
This commit is contained in:
commit
9f78b5f7e2
@ -348,7 +348,7 @@ public class LearnJava {
|
||||
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
|
||||
// Initialization.
|
||||
|
||||
@ -358,9 +358,9 @@ public class LearnJava {
|
||||
add("FINLAND");
|
||||
}}
|
||||
|
||||
// The first brace is creating an new AnonymousInnerClass and the
|
||||
// second one declares and instance initializer block. This block
|
||||
// is called with the anonymous inner class is created.
|
||||
// The first brace is creating a new AnonymousInnerClass and the
|
||||
// second one declares an instance initializer block. This block
|
||||
// is called when the anonymous inner class is created.
|
||||
// This does not only work for Collections, it works for all
|
||||
// non-final classes.
|
||||
|
||||
@ -489,6 +489,7 @@ public interface Digestible {
|
||||
|
||||
// We can now create a class that implements both of these interfaces.
|
||||
public class Fruit implements Edible, Digestible {
|
||||
|
||||
@Override
|
||||
public void eat() {
|
||||
// ...
|
||||
@ -504,6 +505,7 @@ public class Fruit implements Edible, Digestible {
|
||||
// interfaces. For example:
|
||||
public class ExampleClass extends ExampleClassParent implements InterfaceOne,
|
||||
InterfaceTwo {
|
||||
|
||||
@Override
|
||||
public void InterfaceOneMethod() {
|
||||
}
|
||||
@ -511,6 +513,7 @@ public class ExampleClass extends ExampleClassParent implements InterfaceOne,
|
||||
@Override
|
||||
public void InterfaceTwoMethod() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Abstract Classes
|
||||
|
Loading…
Reference in New Issue
Block a user