Java Programming Language MCQ Overriding and Overloading in Java
⚠ Report ✓ Question Verified Copy Link
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 MCQ Overriding and Overloading in Java