8 Java quirks in 16 minutes
summary
Eight concrete Java pitfalls with code, failing tests and fixes: confusion between Double.MIN_VALUE (tiny positive) and the most negative values requiring -Double.MAX_VALUE or -Infinity, BigDecimal(double) producing unexpected binary-to-decimal results versus BigDecimal(String), stream semantics causing allMatch to return true on an empty stream, integer literal leading zeros creating octal numbers, the Integer cache up to 127 reusing objects (== surprises), label syntax treated like a label not a comment, alternative array syntax placements, and mutable enum state that changes all constants.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker intro
- 1:08Null handling in Java methods
- 2:34Integer and double minimum values
- 4:19BigDecimal constructor quirks
- 5:43Stream allMatch on empty sets
- 7:29Octal number literals mistake
- 8:56Integer caching behavior
- 10:39Java keyword as method name
- 12:04Java labels misuse
- 13:30Array and method declaration syntax
- 14:11Enum method side effects
- 15:39Summary and Q&A
related talks
28m11 Crazy Things I Didn't Know You Could Do With Java Until I Got...
40mJava Puzzlers, Strange Loop Edition
57mJava Puzzlers S03
50mModern Java Puzzlers
01h 31mGroovy and Grails Puzzlers - As usual - Traps, Pitfalls, and End Cases
54mJava Puzzlers NG: The strange, the bizarre, and the wonderful
01h 00mon Java - Historical Oddities & Persistent Itches
45mUnlocking Java's Code Maze
