Java Programming Language Inheritance in Java MCQ
⚠ Report Question ✓ Question Verified
class A { int i; } class B extends A { int j; void display() { super.i = j + 1; System.out.println(j + " " + i); } } class inheritance { public static void main(String args[]) { B obj = new B(); obj.i=1; obj.j=2; obj.display(); } }
Learn More MCQ Questions from Java Programming Language Inheritance in Java MCQ
Test your knowledge of inheritance in Java with these multiple choice questions. Improve your understanding of object-oriented programming concepts and become a Java expert. Take the quiz now!