3 ms·
Yes, the value can either be copied or a reference to it can be passed and this determines whether it is pass by value or by reference. It is clear that Java i
by lmilcin 6y ago
Yes, the value can either be copied or a reference to it can be passed and this determines whether it is pass by value or by reference.
It is clear that Java is pass by value but a little bit confusing since everybody is used to thinking about objects as references and this people confuse that these are different references than the ones in "pass by reference".
As to breakpoints this is more complicated and will depend on whether the code is interpreted or it has already been compiled.
In an interpreted bytecode (before JIT comes and compiles it) the buck stops at JVM as it is the one responsible for actually executing the bytecode.
Once JIT comes and compiles the code, the JVM looses ability to stop at a given physical instruction. In this case I think one of two things happen:
1. The function reverts to interpreted (bytecode) version.
or, 2. The JVM inserts instruction into the generated bytecode.
But I don't know JVM that well to tell which one is used, actually.