Skip to content
Advertisement

Tag: pass-by-value

Java Heap and Pass By Value

I am a little confused as to how my Java program is allocating memory. Below is a typical situation in my program. I have an object created on the Heap inside of a class which I pass to other functions inside of other classes. My question(s) are about how the memory is used. When A’s list gets passed to B.bar(),

Advertisement