Gautham Muralidharan wrote:
The output for the above code snippet is a NullPointerException.
But it was mentioned that the answer is null in the webpage where I found the question.
Which is the correct output?
Hi Gautham -
To prepare for this exam, write, compile and execute multiple code snippets; to understand
Java topics.
The questions in this exam will try to ensure that you know your Java inside out. Only reading and trying to comprehend code won't help.
Good Luck to you.
With much respect,
Mala