πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) Implementation

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
99
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ravi Shankar
Publisher
πŸ“ˆ
92%
Success Rate