3 ms·
That's like saying, "Every variable in every language is mutable if I just take this electron gun and aim it at my RAM chip very carefully." You're messing aro
by xmodem 6y ago
That's like saying, "Every variable in every language is mutable if I just take this electron gun and aim it at my RAM chip very carefully."
You're messing around with the internals of the system that was never intended to be touched.
- weinzierl 6y agoThere is a difference between changing internals by doing things outside the system (OS level, hardware level) and changing things with perfectly legal and correct code.
- MaxBarraclough 6y agoI'm not convinced it's legal and correct. You're going to risk breaking internal JVM optimisations like string interning. Whether it's specifically against the letter of the law I'm not sure, but I imagine the Java specification doesn't have much to say about the behaviour of a JVM after someone messes with its internals. That is to say, very roughly speaking, you're likely flirting with what C programmers call undefined behaviour, which is to say, it's likely not legal and correct. https://stackoverflow.com/a/6932880/ https://stackoverflow.com/a/6932880/