Plays from YouTube. Watch on YouTube
Why does perfectly valid Java sometimes produce a result that feels wrong?
Meet Java Gotchas: Shadowing, Copies and Boxing: a visual, example-driven explanation of the decisions behind reliable Java programs.
We start with shadowing hides a name and scope explains lookup, using concrete examples to expose the underlying mechanism.
From there, we examine arraycopy has a boundary, wrapper identity is not value, and their implications for real code.
Then we connect null unboxing throws to equality across types, including mistakes to avoid and boundaries to respect.
Finally, we work through small tests expose edge cases and know the semantic rule.
The big idea: Avoid memorizing individual surprising outputs.
Java and software design explained visually, one concept at a time.