PrepZone Logo
PrepZone
Back to Java

Java · Hard

What is the difference between Java IO and NIO? What are channels, buffers, and selectors in NIO?

JavaAdvanced Java

Answer preview

Java I/O (java.io) is stream-oriented and blocking. Java NIO (java.nio) is buffer-oriented and optionally non-blocking — designed for scalable I/O.…