Merge pull request #2892 from tobyjsullivan/fix-default-method

[java/en] Add default keyword
This commit is contained in:
Pratik Karki 2017-10-07 09:09:53 +05:45 committed by GitHub
commit 64b1378b11

View File

@ -660,7 +660,7 @@ public interface Edible {
public interface Digestible {
public void digest();
// Since Java 8, interfaces can have default method.
public void defaultMethod() {
public default void defaultMethod() {
System.out.println("Hi from default method ...");
}
}