πŸ“Š JAVA
Q. What is the result of the following code snippet?

abstract class MyAbstract {
static void myMethod() {
System.out.println("Static Method");
}
}
class MyClass extends MyAbstract {
public static void main(String[] args) {
MyAbstract.myMethod();
}
}
  • (A) MyClass
  • (B) Runtime exception
  • (C) Static Method
  • (D) Compilation error
πŸ’¬ Discuss
βœ… Correct Answer: (C) Static Method

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
103
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
84%
Success Rate