About Question enthuware.ocpjp.v7.2.1406 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
laura90_m@yahoo.com
Posts: 3
Joined: Sun Apr 14, 2013 12:02 pm
Location: Romania
Contact:

About Question enthuware.ocpjp.v7.2.1406 :

Post by laura90_m@yahoo.com »

The last option

Code: Select all

public void assertTest(List v) {     assert v.size() == 10 : v.add("hello"); }
is indicated to be invalid:
Invalid because boolean : void does not satisfy <boolean_expression> : <any_expression_but_void>
Also, in the explanation, it is said that
Also, v.add(...) returns void. So option 5 is not valid.
But v is a List and add() method returns a boolean, not void. So option 5 is actually valid.

And one more thing: the explanation also contains this:
Option b is invalid because the first operand must be a boolean but here it is a Vector object.
But we do not have Vector objects in this option, we have List objects.

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

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

Post by admin »

You are right. I changed it from vector to list a few days ago and I broke it :(

Fixed now.

thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests