Switch Expressions:Return a Value Without the Break Ritual
Java 14 switch expressions (JEP 361): arrow cases, yield, exhaustiveness — return a value without fall-through breaks. Pattern switch lives in a later post.
Read MoreBrowse the full archive. Use topics in the sidebar to explore by tag.
Java 14 switch expressions (JEP 361): arrow cases, yield, exhaustiveness — return a value without fall-through breaks. Pattern switch lives in a later post.
Read MoreHands-on find recipes for everyday work — hunt by name, type, size, and time, then act on matches with confidence.
Read MoreUse Java 11 java.net.http.HttpClient for HTTP/1.1 and HTTP/2 — builder, sync and async send, body handlers — without Apache HttpClient or OkHttp for ordinary calls.
Read MoreJava 10 var (JEP 286): use local-variable type inference when the right-hand side already names the type, and skip it when var hides what the reader needs.
Read MoreWhat JPMS (JEP 261) actually buys: explicit exports, requires, and a smaller runtime — not a file you copy into every repo. import module is a later language convenience.
Read MoreCompose async Java work with CompletableFuture — supplyAsync, thenApply, thenCompose, allOf — without nested callbacks, and when virtual threads are the simpler path.
Read MoreReplace Calendar and SimpleDateFormat with java.time — Instant, LocalDate, ZonedDateTime, formatting, and a Clock you can fake in tests.
Read MoreHands-on awk recipes for everyday work — pick columns, filter rows, change separators, and compute totals in pipelines.
Read MoreUse java.util.Optional to return absence without null — of/ofNullable, map/flatMap/filter, orElse vs orElseGet, and when wrapping every call is cargo-cult.
Read MoreUse java.util.function’s primitive SAM grid to skip boxing on hot numeric paths, fill IntStream slots, and leave ToIntFunction out of ordinary application code.
Read More