About Question enthuware.ocpjp.v7.2.1525 :
Posted: Mon Dec 03, 2018 11:36 am
I'm using the book OCP Java SE 7 1ZO-804 from Mala Gupta - who writed the following in the book:
A WatchKey can be in multiple states:
■ Ready—A WatchKey is initially created with a ready state.
■ Signaled—When an event is detected, the WatchKey is signaled and queued. It can be retrieved using WatchService’s methods poll() or take().
■ Cancelled—Calling method cancel() on a WatchKey or closing the WatchService cancels a WatchKey.
■ Valid—A WatchKey in a ready or signaled state is in a valid state.
So she's saying that Valid is a state and you are saying Invalid maybe is a correct state? I'm confused.
A WatchKey can be in multiple states:
■ Ready—A WatchKey is initially created with a ready state.
■ Signaled—When an event is detected, the WatchKey is signaled and queued. It can be retrieved using WatchService’s methods poll() or take().
■ Cancelled—Calling method cancel() on a WatchKey or closing the WatchService cancels a WatchKey.
■ Valid—A WatchKey in a ready or signaled state is in a valid state.
So she's saying that Valid is a state and you are saying Invalid maybe is a correct state? I'm confused.