About Question enthuware.ocpjp.v7.2.1563 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
yescat
Posts: 3
Joined: Thu Aug 21, 2014 9:08 pm
Contact:

About Question enthuware.ocpjp.v7.2.1563 :

Post 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.

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right but the option says "incorrect". That is why the option is wrong.

yescat
Posts: 3
Joined: Thu Aug 21, 2014 9:08 pm
Contact:

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

Post by yescat »

Doh! Right. Looks like I need to read the answer choices more carefully. Thanks!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 10 guests