Menu
Question Index
...

What will be the output of the following program?

interface MyFirstInterface {
    void output();
}
interface MySecondInterface extends MyFirstInterface {
    void output();
}
public class DemoOnInterface implements MySecondInterface {
    public void output() {
        System.out.println("Programming competattion on Meritcampus... Hurry up");
    }
    public static void main(String args[]) {
        DemoOnInterface demoOnInterface = new DemoOnInterface();
        demoOnInterface.output();
    }
}


Programming competattion in Meritcampus... Hurry up
(EMPTY)
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java Interface

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App