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