~/talk

8 Java quirks in 16 minutes

Talkat J-Fall 2022 · on Thursday, 2022-11-03· [java]
links:none on file
slides:none on file

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

  1. 0:00Introduction and speaker intro
  2. 1:08Null handling in Java methods
  3. 2:34Integer and double minimum values
  4. 4:19BigDecimal constructor quirks
  5. 5:43Stream allMatch on empty sets
  6. 7:29Octal number literals mistake
  7. 8:56Integer caching behavior
  8. 10:39Java keyword as method name
  9. 12:04Java labels misuse
  10. 13:30Array and method declaration syntax
  11. 14:11Enum method side effects
  12. 15:39Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.