What will be the output of the following program?
Correct Answer : A
The program starts with the
main method. Objects
kiran of type
Student are created using various constructors. But as we can see in the constructors, there is no assignment of the passed parameters to the member variables. So the member variables will not be changed and continue to have the default values which are
name (since it is initialized to
section. Please note that since
section is initialized to
'\u0000' nothing gets printed.
Hence, the answer is A.