I'm playing around Java 8's new features recently and observed an interesting behaviour:
This is okay:
Class A { static void staticMethodInA() {println();} }
Class B extends A {}
B.staticMethodInA();
This would induce an error of: static method may be invoked on containing interface class only.
interface A { static void staticMethodInA() {println();} }
Class B implements A {}
B.staticMethodInA(); // from here IntelliJ complaints..
Can someone tell me why the designer of Java 8 may choose to treat the above 2 cases differently?