MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program? class A { public int i; public int j; A() { i = 1; j = 2; } } class B extends A { int a; B() { super(); } } class super_use { public static void main(String args[]) { B obj = new B(); System.out.println(obj.i + " " + obj.j) } } |
| A. | 1 2 |
| B. | 2 1 |
| C. | Runtime Error |
| D. | Compilation Error |
| Answer» B. 2 1 | |