Why does Java 8 not allow non-public default methods?
问题 Let's take an example: public interface Testerface { default public String example() { return "Hello"; } } public class Tester implements Testerface { @Override public String example() { return Testerface.super.example() + " world!"; } } public class Internet { public static void main(String[] args) { System.out.println(new Tester().example()); } } Simply enough, this would print Hello world! . But say I was doing something else with the return value of Testerface#example , for instance