diff options
| author | Jakukyo Friel <weakish@gmail.com> | 2015-01-07 23:15:25 +0800 | 
|---|---|---|
| committer | Jakukyo Friel <weakish@gmail.com> | 2015-01-07 23:15:25 +0800 | 
| commit | 0512b3120acbe9d3a534cbc7685c30a65e067801 (patch) | |
| tree | f9e0de6e97596417def7b7ff07e15086b99cc0a1 | |
| parent | 38be1f2f179ce26129f7d702bb86cb5d11fbda55 (diff) | |
java: Add `@Override` for interfaces.
| -rw-r--r-- | java.html.markdown | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/java.html.markdown b/java.html.markdown index 4661d4f9..3dd65679 100644 --- a/java.html.markdown +++ b/java.html.markdown @@ -4,6 +4,7 @@ language: java  contributors:      - ["Jake Prather", "http://github.com/JakeHP"]      - ["Madison Dickson", "http://github.com/mix3d"] +    - ["Jakukyo Friel", "http://weakish.github.io"]  filename: LearnJava.java  --- @@ -433,10 +434,12 @@ 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() {  		//...  	} +    @Override  	public void digest() {  		//...   	} @@ -445,10 +448,12 @@ public class Fruit implements Edible, Digestible {  //In java, you can extend only one class, but you can implement many interfaces.  //For example:  public class ExampleClass extends ExampleClassParent implements InterfaceOne, InterfaceTwo { +    @Override  	public void InterfaceOneMethod() {  	} +    @Override  	public void InterfaceTwoMethod() {  	}  | 
