Single Choice
Not Set
QWhat will be the output?
class Parent{
public void method(){
System.out.println("Hi i am parent");
}
}
public class Child extends Parent{
protected void method(){
System.out.println("Hi i am Child");
}
public static void main(String args[]){
Child child = new Child();
child.method();
}
}
ID: #2260
Inheritance in Java MCQ
2,348 views
Question Info
#2260Q ID
Not SetDifficulty
Inheritance in Java MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Compile time error
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic