A
Q. What is the result of the following code snippet?
interface MyInterface {
void myMethod();
}
public class MyClass implements MyInterface {
public void myMethod() {
System.out.println("Implementation");
}
public static void main(String[] args) {
MyInterface obj = new MyClass();
obj.myMethod();
}
}
- Correct Answer - Option(D)
- Views: 12
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.