Vidyalelo
Java Programming · Q241

Interfaces and Abstract Classes

Programming · Java Programming · question 241

Q241

What will be the output of the following Java 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 = a.getClass(); System.out.print(obj.getName());

A.
X
Answer
B.
Y
C.
a
D.
b

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board