What is a `Selector` in Java NIO?
A `Selector` in Java NIO is used to monitor multiple channels for events such as readiness to read or write, allowing a single thread to handle I/O for multiple channels concurrently.
Exactly! `Selectors` provide an efficient way to multiplex I/O operations, which is key to implementing non-blocking I/O in Java.
Can you explain how a `Selector` interacts with a `SelectableChannel` during an I/O operation?