MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program? class X { int a; double b; } class Y extends X { int c; } class Output { public static void main(String args[]) { X a = new X(); Y b = new Y(); Class obj; obj = b.getClass(); System.out.print(obj.getSuperclass()); } } |
| A. | X |
| B. | Y |
| C. | Class X |
| D. | Class Y |
| Answer» D. Class Y | |