World 18 of 26 · Intermediate

📁 I/O, Files & Networking

12 Java concepts, each explained step by step with real code, a common trap and practice questions.

  1. Byte streams vs character streamsInputStream/OutputStream vs Reader/Writer.
  2. BufferingBufferedReader/Writer, why unbuffered I/O is slow, flush.
  3. Charsets & encodingUTF-8, StandardCharsets, platform default pitfalls.
  4. Path & Files (NIO.2)Path.of, Files.readString, readAllLines, lines, write, exists, walk.
  5. Closing resourcestry-with-resources for files and streams; Files.lines must be closed.
  6. File I/O exceptionsIOException, NoSuchFileException, UncheckedIOException.
  7. SerializationSerializable, transient, serialVersionUID, and deserialization security risks.
  8. Console & standard streamsSystem.in/out/err, BufferedReader vs Scanner performance.
  9. HttpClientJava 11+ HTTP client: sync send, sendAsync, BodyHandlers.
  10. Sockets basicsSocket/ServerSocket, client-server model, blocking I/O.
  11. NIO channels & buffersByteBuffer, channels, non-blocking I/O and selectors at a high level.
  12. Working with JSONNo JSON in the JDK; Jackson/Gson concepts of mapping objects.