Section outline

  • Lesson intent: turn students into “systems builders” who can read messy text, extract meaning, persist data safely, and avoid common traps in I/O and serialization.

    • Micro-topic BB1-L23-MT1 — Regex is a pattern language for messy text

      Goal: Students can read a regex like a blueprint, and can predict what it matches and what it does not.

    • Micro-topic BB1-L23-MT2 — Groups, splitting, and replacing with regex

      Goal: Students can extract parts of a match (groups), iterate all matches, split reliably, and replace safely.

    • Micro-topic BB1-L23-MT3 — Text file I/O with streams, readers, and try-with-resources

      Goal: Students can read and write text files safely, understand encoding basics, and avoid resource leaks.

    • Micro-topic BB1-L23-MT4 — NIO.2 Path and Files: modern file operations

      Goal: Students can use Path and Files to read/write/copy/move, work with directories, and understand when “convenient” methods are safe vs risky.

    • Micro-topic BB1-L23-MT5 — Serialization: saving object graphs, versioning, and safety

      Goal: Students can explain what Java serialization does, use it at a basic level, and (most importantly) know the traps: serialVersionUID, transient, compatibility, and deserialization risk.