Java Programming Language Overriding and Overloading in Java
⚠ Report Question ✓ Question Verified
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(); } }
Learn More MCQ Questions from Java Programming Language Overriding and Overloading in Java
Evaluate your knowledge of Java overriding and overloading with these multiple choice questions. Learn about the difference between the two concepts and how to use them to create more flexible and efficient Java programs. Take the quiz now!