how passing value types will work?
david Grajales
david.1993grajales at gmail.com
Sun Oct 19 22:56:45 UTC 2025
Java always passes by value. When someone passes a primitive to a method it
passes a copy of the value of the primitive, when one pass a reference type
what is really being passed it's a copy of the "value" of the object (just
happens to be the value of an object is its reference)
When a value object (let's say a value record) is being passed to a method,
does it pass a copy of the values or a reference to where the values are in
memory?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20251019/ebcd73a8/attachment.htm>
More information about the valhalla-dev
mailing list