no its same with non primitives if you pass an object through method, the n you are passing the copy of object as value and not actual object. Thats why its pass by value
cuz they both are point to same thing. but when its gets returned and when it gets collected as value, sender and collctor are two different but they point to same location.
Java does manipulate objects by reference, and all object variables are references. However, Java doesn't pass method arguments by reference; it passes them by value.
Java is a pass-by-value, when you pass a primitive\wrapper you will pass its inner value, and when you pass an object (a reference) you will pass its value (which is the address of the object it references in the memory).
you got it correctly....
you will pass its value (which is the address of the object it references in the memory).
I always thought Java was pass-by-reference; however I've seen a couple of blog posts (e.g. this blog) that claim it's not. I don't think I understand the distinction they're making.
Could someone explain it please?