Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
虚拟扩展方法/又名默认可覆盖方法的语法(在 jdk 8 中)有据可查:
public interface Foo { default void bar(String out) { System.out.println(out); }; }
但是我找不到接口上静态非继承方法的正确语法的任何参考 ?
语法与方法在类中的语法相同:
public static void bar() { System.out.println("hello"); }