Q19
What is the result of the following code snippet?interface MyInterface default void myMethod() System.out.println("Default Implementation"); class MyClass implements MyInterface public static void main(String[] args) MyInterface obj = new MyClass(); obj.myMethod();
A.
Default Implementation
AnswerB.
Compilation error
C.
Runtime exception
D.
MyClass
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board