Last active
October 25, 2015 14:31
-
-
Save anjanashankar9/3043a8310dfca247016d to your computer and use it in GitHub Desktop.
Interfaces in Java8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MyInterface { | |
/** | |
* All the methods of an interface are public by default | |
*/ | |
void method1(); | |
void method2(); | |
default void newMethod(){ | |
System.out.println("This is the default implementation of the method"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment