multiple inheritance through interface()

PHOTO EMBED

Thu Jan 11 2024 18:15:33 GMT+0000 (Coordinated Universal Time)

Saved by @E23CSEU1151 #java

interface A {
    void show();
}

interface S {
    void hide();
}

class W implements A, S {
    public void show() {
        System.out.println("ok boss");
    }

    public void hide() {
        System.out.println("no boss");
    }
}

class L {
    public static void main(String[] args) {
        W r = new W();
        r.show();
        r.hide();
    }
}
content_copyCOPY