Page 1 of 1

Which statement is true about the take method defined in the WatchService interface?

Posted: Wed Jun 07, 2023 6:11 am
by answerhappygod
Which statement is true about the take method defined in the WatchService interface?

A. Retrieves and removes the next watch key, or returns null of none are present.
B. Retrieves and removes the next watch key. If a queued key is not immediately available, the program waits for the specified wait time.
C. Retrieves and removes the next watch key: waits if no key is yet present.
D. Retrieves and removes all pending events for the watch key, returning a list of the events that were retrieved.