#JavaTraps içeren gönderiler

#JavaTraps

X'te #JavaTraps kullanan herkese açık gönderiler.

İlgili etiketler

  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
    İndir
    016451
  2. 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
    İndir
    003164
  3. 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
    İndir
    004173
  4. Nidhi Tiwari@NidhiDevNotes
    Java Traps #14 Synchronized on the wrong object synchronized only works if all threads lock the same object. If you lock on new Object(), every thread gets its own lock. So everyone thinks they’re synchronized but no one actually is. #Java #JavaTraps #TechTwitter #SoftwareEngineering
    İndir
    004335
  5. Daha fazla gönderi göster