How to Read and Write Files in Java with NIO.2 (Java 21)
Build a parcel scan log in Java 21 with NIO.2: append, stream, atomically replace and archive files, plus 20 checks and the errors I hit on purpose.
Build a parcel scan log in Java 21 with NIO.2: append, stream, atomically replace and archive files, plus 20 checks and the errors I hit on purpose.
Turn a for loop into a Java streams pipeline that filters and transforms a list. Build a gradebook in Java 21, trip every classic mistake, and check it all.
Build an on-call rota in Java 21 with EnumSet for roles and gaps and EnumMap for schedules and counts, then trigger ten traps that bite in real code.
Build a stock-sync job in plain Java 21 and use CountDownLatch, CyclicBarrier and Semaphore each where it fits, with runnable checks and the traps I forced.
Build a URL shortener in Java 21 with a static factory, a registry factory and an abstract factory, then swap memory for file storage with one config value.
Build a stock-alert system with the observer pattern in Java 21: a thread-safe subject, lambda listeners, safe unsubscribe, and 16 checks that prove it works.
Build a parcel-scan counter on JDK 21 with AtomicLong, LongAdder, AtomicReference and AtomicBoolean, then fix a dock gate that lets three trucks into two bays.
Build a currency-rate pipeline with a bounded BlockingQueue: back-pressure, poison pills, clean shutdown and 15 plain-Java checks on JDK 21. Full code.
Write a generic class, generic methods, bounded types and wildcards in Java 21 by building a parcel shelf, with 21 passing checks and the compiler errors.
Flatten students, courses and assignments with flatMap, flatMapToInt, Optional.stream and mapMulti on Java 21. 22 checks, forced errors and the fixes included.