Tagged articles

Wrapper Classes

3 articles · Page 1 of 1
Java Backend Technology
Java Backend Technology
Jun 25, 2022 · Fundamentals

Why Java Wrapper Classes Can Kill Performance and Trigger NPEs

This article explains how Java wrapper classes, introduced with generics, provide boxing and unboxing sugar but can cause subtle bugs such as incorrect == comparisons, severe performance penalties, unexpected NullPointerExceptions, and confusing API usage, and it offers practical best‑practice guidelines.

NullPointerExceptionUnboxingWrapper Classes
0 likes · 9 min read
Why Java Wrapper Classes Can Kill Performance and Trigger NPEs
Top Architect
Top Architect
Dec 31, 2020 · Fundamentals

Understanding Java Autoboxing and Unboxing: Mechanisms, Performance Implications, and Common Pitfalls

This article explains Java's autoboxing and unboxing processes, illustrates how wrapper classes like Integer, Double, and Boolean handle value conversion and caching, shows the generated bytecode, discusses performance impacts of object creation, and warns about comparison and null‑pointer pitfalls.

AutoboxingNullPointerExceptionUnboxing
0 likes · 9 min read
Understanding Java Autoboxing and Unboxing: Mechanisms, Performance Implications, and Common Pitfalls
Java Captain
Java Captain
May 27, 2019 · Fundamentals

Java Runtime Memory Areas, Object Creation, and Common Interview Questions

This article explains Java's runtime memory regions, including the program counter, stacks, heap, method area, constant pool, and direct memory, and details the HotSpot object creation process, memory layout, access mechanisms, as well as String and wrapper class behaviors, providing essential knowledge for Java interview preparation.

Interview PreparationJVMMemory Management
0 likes · 19 min read
Java Runtime Memory Areas, Object Creation, and Common Interview Questions