Tagged articles
5 articles
Page 1 of 1
Senior Brother's Insights
Senior Brother's Insights
Sep 6, 2020 · Fundamentals

Is Java Pass‑by‑Value or Pass‑by‑Reference? A Deep Dive into Method Parameter Passing

This article demystifies Java's method‑parameter passing by analyzing code examples with primitives, strings, and objects, illustrating how the JVM copies values—including reference addresses—so that arrays appear mutable while reassigning a String or object reference does not affect the original variable.

memory-modelmethod-parameterspass-by-value
0 likes · 10 min read
Is Java Pass‑by‑Value or Pass‑by‑Reference? A Deep Dive into Method Parameter Passing
Architecture Digest
Architecture Digest
Dec 7, 2019 · Fundamentals

Understanding the Java volatile Keyword and Its Role in Concurrency

This article explains the Java volatile keyword, covering its memory visibility and ordering guarantees, how it interacts with the Java Memory Model, common pitfalls such as lack of atomicity, and practical usage examples like flag signaling and double‑checked locking in concurrent programming.

JMMJavaconcurrency
0 likes · 17 min read
Understanding the Java volatile Keyword and Its Role in Concurrency
Java Backend Technology
Java Backend Technology
Nov 27, 2017 · Fundamentals

Why Swapping Two Integers Fails in Java? Exploring Pass‑by‑Value, Handles, and Integer Caching

This article dissects a Java interview question about swapping two Integer variables, explaining Java's pass‑by‑value semantics, the difference between handle‑based and direct pointer object access, Integer immutability, autoboxing, the IntegerCache mechanism, and how reflection can (or cannot) modify private final fields.

AutoboxingJDKReflection
0 likes · 10 min read
Why Swapping Two Integers Fails in Java? Exploring Pass‑by‑Value, Handles, and Integer Caching