Same Variable, Different Meaning: A Readability Trap in Java
Reusing a variable name for two unrelated values compiles fine but quietly hurts readability — here's why, and the naming discipline that fixes it.
4 artigos
Reusing a variable name for two unrelated values compiles fine but quietly hurts readability — here's why, and the naming discipline that fixes it.
A plain-language explanation of Java visibility bugs — why a field write can compile fine and still never be seen by another thread, and how volatile and AtomicReference fix it.
A plain-language explanation of effectively final variables — why Java enforces it, the classic accumulator mistake, and the right way to fix it.
A practical look at modern immutability in Java with records — the real trade-offs, common pitfalls, and a preview of where Project Valhalla is taking it next.