R

Ravi Shankar • 4.19K Points
Extraordinary

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();
}
}

  • (A) Runtime exception
  • (B) Implementation
  • (C) MyClass
  • (D) None of these
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics