public interface Demo{ public static void print() { System.out.println("Hello World!"); } }
public interface Demo{ public abstract void method(); }
public interface Demo{ //默认方法 public default void method(){ System.out.println("default method..."); } //静态方法 public static void print(){ System.out.println("static method..."); } }
public interface Demo{ private void method() { System.out.println("Hello World!"); } }