Tagged articles
pass-by-value
11 articles · Page 1 of 1
The article clarifies that Java always uses pass‑by‑value—whether for primitive types or object references—by showing how values are copied, how reference addresses are passed as values, and why common misconceptions about reference passing arise.
Code ExampleJavafundamentals
0 likes · 12 min read

This article explains the differences between pass‑by‑value and pass‑by‑reference in PHP, outlines their characteristics, provides code examples for each, and offers guidance on choosing the appropriate method based on safety, memory usage, and performance considerations.
Function ParametersPHPPass by Reference
0 likes · 3 min read

Understanding C++ parameter passing—by value, by reference, and by pointer—is essential for optimizing performance, memory usage, and data safety, and this guide explains each method’s characteristics, provides code examples, and offers practical advice on selecting the appropriate technique for different scenarios.
C++Function ParametersPass by Reference
0 likes · 6 min read

This article explains PHP function parameter passing, covering pass‑by‑value versus pass‑by‑reference, how to define functions with multiple, default, and variable‑length arguments, and provides clear code examples illustrating each technique for backend developers.
Function ParametersPHPPass by Reference
0 likes · 4 min read

This article demystifies Java’s parameter passing mechanism by clarifying the distinction between primitive and reference types, illustrating how assignment and method calls affect values and objects, and explaining the underlying JVM memory model, stack, heap, and array handling with clear code examples.
JVM memoryJavaReference Types
0 likes · 8 min read

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

This article explains that Java fundamentally uses pass‑by‑value for method parameters, distinguishing between primitive value types stored on the stack and reference types whose references are passed, and demonstrates the behavior with code examples that clarify why apparent reference passing is actually passing a copy of the reference.
JVMJavaReference Types
0 likes · 7 min read

This article clarifies the long‑standing confusion about whether Java uses pass‑by‑value or pass‑by‑reference by defining both concepts, explaining the roles of actual and formal parameters, illustrating with primitive and object examples, and showing why Java is technically pass‑by‑value even for reference types.
JavaReference Typesparameter passing
0 likes · 8 min read

This article clarifies the long‑standing confusion about whether Java uses pass‑by‑value or pass‑by‑reference by defining the concepts, distinguishing actual and formal parameters, and demonstrating with primitive and object examples that Java always passes arguments by value, using the reference as the value for objects.
Code ExamplesJavaparameter passing
0 likes · 8 min read

This article explains that Java passes primitive arguments by value, so attempts to swap two ints inside a method have no effect on the caller, and demonstrates both the faulty implementation and the proper solutions using a temporary variable or a return value.
JavaSwapfundamentals
0 likes · 4 min read

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.
AutoboxingInteger cachingJDK
0 likes · 10 min read
