Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Last active October 25, 2015 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/3043a8310dfca247016d to your computer and use it in GitHub Desktop.
Save anjanashankar9/3043a8310dfca247016d to your computer and use it in GitHub Desktop.
Interfaces in Java8
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