public class defaultdemoapp {
public static void main(string[] args) {
new classa().defaultfunction();
new classab().defaultfunction();
}
}
interface intera {
default void defaultfunction() {
system.out.println("this is a defaultfunction");
}
static void staticfunction() {
system.out.println("this is a status function");
}
}
interface interb {
default void defaultfunction() {
system.out.println("this is b defaultfunction");
}
static void staticfunction() {
system.out.println("this is b status function");
}
}
class classa implements intera {
}
class classab implements intera, interb {
@override
public void defaultfunction() {
interb.staticfunction();
}
}