Single Choice
Not Set
QWhat will be the output?
class A{
static void method(){
System.out.println("Class A method");
}
}
class B extends A{
static void method(){
System.out.println("Class B method");
}
}
public class Test{
public static void main(String args[]){
A a = new B();
a.method();
}
}
ID: #2231
Overriding and Overloading in Java
936 views
Question Info
#2231Q ID
Not SetDifficulty
Overriding and Overloading in JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Class A method
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic