Wat? That’s Possible in Java?
summary
Live demos show concrete surprises: Integer cache via reflection lets code rewrite cached wrapper values (newer JDKs require module opens), a sneaky throw generic cast raises checked exceptions without declaring them, receiver parameters let methods accept an explicit this-like first argument, and mutating a String’s internal value array via reflection changes supposedly final constants. Also covers preview features (top-level main, pattern matching edge cases where int instance-of float fails due to float encoding) and odd brace/semicolon hacks that only work by formatting.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:56Python-like Java syntax
- 3:43Receiver parameters and maps
- 6:16Inlining pitfalls
- 8:16Advanced instanceof usage
- 11:22Integer cache manipulation
- 14:35Sneaky checked exceptions
- 16:12String reflection tricks
- 18:29Array syntax and conclusion
related talks
28m11 Crazy Things I Didn't Know You Could Do With Java Until I Got...
50mExploring what's new in Java in 2020.
01h 11mModern Java: This is not your father's Java anymore
50mModern Java Puzzlers
55mA Few New Cool Features in Modern Java
45mFive Java Features You Didnt Know About
40mSailing Java 16
02h 36mJava keeps throttling up!
