Single Choice
Not Set
Qwhat is the result of the following piece of code:
public class Person{
public void talk(){
System.out.print("I am a Person");
}
}
public class Student extends Person{
public void talk(){
System.out.print("I am a Student");
}
}
public class Test{
public static void main(String args[]){
Person p = new Student();
p.talk();
}
}
ID: #2237
Overriding and Overloading in Java
2,680 views
Question Info
#2237Q 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
I am a Student
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic