Java Programming Language Overriding and Overloading in Java
⚠ Report Question ✓ Question Verified
class A{ private void printName(){ System.out.println("Value-A"); } } class B extends A{ public void printName(){ System.out.println("Name-B"); } } public class Test{ public static void main (String[] args){ B b = new B(); b.printName(); } }
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!