Java Programming Language Overriding and Overloading in Java
⚠ Report Question ✓ Question Verified
interface A{ public void method1(); } class One implements A{ public void method1(){ System.out.println("Class One method1"); } } class Two extends One{ public void method1(){ System.out.println("Class Two method1"); } } public class Test extends Two{ public static void main(String[] args){ A a = new Two(); a.method1(); } }
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!