summaryrefslogtreecommitdiffhomepage
path: root/java.html.markdown
diff options
context:
space:
mode:
authorven <vendethiel@hotmail.fr>2015-01-07 17:08:36 +0100
committerven <vendethiel@hotmail.fr>2015-01-07 17:08:36 +0100
commit54c5dfb9c82eeca1c16ca2422c45f099be8f70a1 (patch)
tree45c9d8a9fd988fa266486de56a9dca453214808c /java.html.markdown
parent50360c254863463b09911d0d262de048531a0452 (diff)
parent0512b3120acbe9d3a534cbc7685c30a65e067801 (diff)
Merge pull request #912 from weakish/java-interface
java: Add `@Override` for interfaces.
Diffstat (limited to 'java.html.markdown')
-rw-r--r--java.html.markdown5
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() {
}