Tag

Javap

0 views collected around this technical thread.

Architect's Guide
Architect's Guide
Jun 27, 2023 · Backend Development

Understanding Java String Concatenation, StringBuilder, and Object Creation with javap Analysis

The article explains why using the '+' operator for string concatenation in Java creates many temporary objects, how the StringBuilder class and compile‑time optimizations can avoid this overhead, and demonstrates object‑creation counts for two typical interview questions using javap bytecode inspection.

JavaJavapString Concatenation
0 likes · 10 min read
Understanding Java String Concatenation, StringBuilder, and Object Creation with javap Analysis
Architect's Tech Stack
Architect's Tech Stack
Nov 27, 2020 · Backend Development

When Does Java Use StringBuilder for String Concatenation?

This article investigates Java's string concatenation behavior, demonstrating through two examples why some concatenations invoke StringBuilder while others are optimized by the compiler, and explains the underlying bytecode differences revealed by decompiling with javap.

Compiler OptimizationJavaJavap
0 likes · 3 min read
When Does Java Use StringBuilder for String Concatenation?
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 10, 2020 · Fundamentals

Understanding Java Integer Caching and the Pitfalls of Using == vs equals

This article explains Java's Integer caching mechanism, why using == on wrapper objects can be misleading outside the -128 to 127 range, shows how to control the cache size with JVM options, and demonstrates bytecode inspection with javap to reveal the underlying valueOf calls.

JVM optionsJavaJavap
0 likes · 5 min read
Understanding Java Integer Caching and the Pitfalls of Using == vs equals
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 16, 2020 · Backend Development

Understanding Java Integer Caching and Autoboxing: Why == Fails and How to Use equals

This article explains Java's Integer caching mechanism, why using == on Integer objects can give unexpected results outside the -128 to 127 range, how the Integer.valueOf method and the IntegerCache work, and how to inspect the behavior with javap and JVM options.

IntegerCacheJavaJavap
0 likes · 6 min read
Understanding Java Integer Caching and Autoboxing: Why == Fails and How to Use equals
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Mar 11, 2020 · Fundamentals

Understanding Java Integer Caching and Autoboxing: When == Can Mislead

This article explains Java's Integer caching mechanism, why using == to compare wrapper objects can produce unexpected results, how the IntegerCache works, how to adjust its range with JVM options, and demonstrates the behavior through code examples and javap decompilation.

JavaJavapautoboxing
0 likes · 7 min read
Understanding Java Integer Caching and Autoboxing: When == Can Mislead