MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?class N { int K; } class M extends N { int L; void display() { super.K = L + 5; System.out.println(K + " " + L); } } public class inheritance_Example { public static void main(String args[]) { M object = new M(); object.K=4; object.L=3; object.display(); } } |
| A. | 8 3 |
| B. | 4 3 |
| C. | 3 8 |
| D. | 3 4 |
| E. | None of these |
| Answer» B. 4 3 | |