Well the "new Logger()" is ambiguous. There is no Logger class in java.lang package since the code has no import statements. The Java API has however a java.util.logging.Logger but the constructor is protected.
Therefore, you need to explicitly use the fully qualified name for Logger.
Kancharla Madhu wrote:public modifier was not there in the actual question itself,If you want me send the snapshot of the question I can.
I see that this question ( QID: enthuware.ocajp.i.v7.2.915 ) was last updated on 09/11/2012 and it does have the modifier (at least since then). So you seem to be using an older version of the question bank. Please update your question bank.