Email address:
Password:
SCJP/OCPJP 1.6 certification
Practice Exams and Training
SCJP Online Training » Discussions

Is this answer wrong?

Hello,


I re checked the question, and also checked with my IDE, and answer is D.


Sincerely

The s1 variable needs to be initialized before it can continue into the initialization of s2. Therefore, during the time the s1 variable is being initialized, the s2 variable remains null, which makes G the correct answer.


If your IDE is giving different result, that indicates the JVM/JRE your IDE uses does not comply with the Oracle specification. If that's the case, stop using that IDE and use Oracle javac command while you prepare for the exam, because that's what the exam questions are created upon.

ExamLab © 2008 - 2024