About Question enthuware.ocpjp.v7.2.1563 :
Moderator: admin
-
- Posts: 3
- Joined: Thu Aug 21, 2014 9:08 pm
- Contact:
About Question enthuware.ocpjp.v7.2.1563 :
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.
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1563 :
You are right but the option says "incorrect". That is why the option is wrong.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Thu Aug 21, 2014 9:08 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1563 :
Doh! Right. Looks like I need to read the answer choices more carefully. Thanks!
Who is online
Users browsing this forum: No registered users and 46 guests