Page 1 of 1

About Question enthuware.ocpjp.v7.2.1563 :

Posted: Thu Aug 21, 2014 9:11 pm
by yescat
I get that the correct answer is to throw a Runtime Exception. But shouldn't "The given code is syntactically incorrect." also be a correct answer? There's nothing syntactically wrong about using an assertion to check input in a public method is there? It's just not an appropriate use of assertions.

Re: About Question enthuware.ocpjp.v7.2.1563 :

Posted: Thu Aug 21, 2014 9:50 pm
by admin
You are right but the option says "incorrect". That is why the option is wrong.

Re: About Question enthuware.ocpjp.v7.2.1563 :

Posted: Thu Aug 21, 2014 10:50 pm
by yescat
Doh! Right. Looks like I need to read the answer choices more carefully. Thanks!