Interface with default method


Source code

1interface InterfaceWithDefaultMethod {
2
3 void m1();
4
5 default void m2() {
6 }
7
8 default void m3() {
9 new String().hashCode();
10 }
11
12}

Bytecode



Java compiler version: 21
Other examples
Main page