Page 1 of 1

About Question enthuware.ocpjp.v7.2.1503 :

Posted: Tue Nov 11, 2014 10:31 pm
by lunars
The exam has questions that require you to know valid states but it is not clear whether invalid is considered a state or not.
Agreed that the API docs are not clear on this topic. But for the record, Oracle's official tutorial docs do list it as three states:
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:
    • ◦ The process explicitly cancels the key by using the cancel method.
      ◦ The directory becomes inaccessible.
      ◦ The watch service is closed.
https://docs.oracle.com/javase/tutorial ... ml#process

From the look of it I think I would be inclined to count it as one if the question were to come up.

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

Posted: Fri Nov 14, 2014 1:26 am
by admin
That is a good point. We will leave it open so that other readers may make their own informed decision.
-Paul.