python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
What is the difference between passing by reference and passing by value of arrays for recursive calls which share a reference via a closure?
I was working on a solution to the following prompt: Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.
The following code passes t...
Leo C.
Votes: 0
Answers: 0
Does it refer to the same object or not when an object is passed as an argument of the constructor of another class?
So I came across some confusing code like this.
public class Class1 {
private Class2 class2 = new Class2(this);
public void dispose() {
if (class2 != null) {
class2.dispos...
Imal
Votes: 0
Answers: 1
Could pass object as function parameter and reassign it in function to modify its value out of function scope in java?
I am confused about the pass-by-value mechanism in Java even though I have read some questions about it like this and this.
I thought primitive type is passed by value in function parameters so it wo...

Bowen Peng
Votes: 0
Answers: 2
Is passing pointer by value or by reference the same
What is the difference between passing a pointer by reference and passing a pointer by value in C?
My understanding is when you pass arguments to methods a new stack frame is created and those values ...
Kyle C
Votes: 0
Answers: 4