Postări cu #JavaTraps

#JavaTraps

Postări publice de pe X care folosesc #JavaTraps.

Hashtaguri înrudite

  1. Nidhi Tiwari@NidhiDevNotes
    Java Traps #15 “Immutable” classes that aren’t actually immutable Your class can be final and still be mutable if it exposes or stores mutable objects incorrectly. final protects references, not data. Defensive copies = real immutability #Java #JavaTraps #SoftwareEngineering #TechTwitter
    Descarcă
    016451
  2. Nidhi Tiwari@NidhiDevNotes
    Java Traps #7 Concurrent Modification The for-each loop is secretly using an iterator. When you modify the list directly, the loop and the collection go out of sync. Java fails fast and throws an exception to stop corrupt or unpredictable behaviour early. #Java #JavaTraps #SoftwareEngineering #TechTwitter
    Descarcă
    004173
  3. Nidhi Tiwari@NidhiDevNotes
    Java Traps #6 Floating Point Comparison Java can’t store some decimal numbers exactly, so math with doubles isn’t perfectly accurate. That’s why you compare them using a small tolerance instead of ==. #Java #JavaTraps #SoftwareEngineering
    Descarcă
    003164
  4. Arată mai multe postări