Q32
what 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();
A.
I am a Person
B.
I am a Student
AnswerC.
I am a Person I am a Student
D.
I am a Student I am a Person
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board