About Question enthuware.ocpjp.v7.2.1525 :

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
ilkinesrefli
Posts: 4
Joined: Mon May 13, 2013 11:27 pm
Contact:

About Question enthuware.ocpjp.v7.2.1525 :

Post by ilkinesrefli »

Hello, this question is confused. Maybe question must be "A WatchKey can be in which of the following valid states?" or answer must be 3(ready,signaled,invalid)
If watchkey.reset() returns false that means state is invalid.
Because documentation wrote:A watch key has a state. At any given time, its state might be one of the following:
  • Ready indicates that the key is ready to accept events. When first created, a key is in the ready state.
  • Signaled indicates that one or more events are queued. Once the key has been signaled, it is no longer in the ready state until the reset method is invoked.
  • Invalid indicates that the key is no longer active. This state happens when one of the following events occurs:
    1. The process explicitly cancels the key by using the cancel method.
    2. The directory becomes inaccessible.
    3. The watch service is closed.
http://docs.oracle.com/javase/tutorial/ ... ation.html

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

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

Post by admin »

Yes, and the explanation mentions the same point.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

ilkinesrefli
Posts: 4
Joined: Mon May 13, 2013 11:27 pm
Contact:

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

Post by ilkinesrefli »

But this question or answer is wrong. Documentation says WatchKey have ready, signaled, invalid states. Please correct mistake for this question(2.1525).

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

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

Post by admin »

The reason "Invalid" is not marked as correct is because the JavaDoc (which is the official documentation) does not clearly mention invalid as a state. Here is what it says:
When initially created the key is said to be ///ready///. When an event is detected then the key is ///signaled/// and queued so that it can be retrieved by invoking the watch service's poll or take methods. Once signalled, a key remains in this state until its reset method is invoked to return the key to the ready state."
It does mention invalid in the description of cancel method.

However, in light of the tutorial link that've mentioned, I think it is better to mark invalid as a right option as well. This has now been update.

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

ilkinesrefli
Posts: 4
Joined: Mon May 13, 2013 11:27 pm
Contact:

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

Post by ilkinesrefli »

Hello, when this question will be updated? There is no new version of question bank.

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

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

Post by admin »

The version number was updated today. Please check now.

HTH,
Paul.
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 18 guests