Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Java default method example
package com.brs;
public class JavaDefaultMethodsExample {
public static void main(String[] args) {
MyJavaExample myJavaExample = new MyJavaExample();
class MyJavaExample implements InterfaceOne {
interface InterfaceOne {
default void writeOut() {
System.out.println("In InterfaceOne");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.