Re:a[low:high:max] in Golang – A Rare Slice Trick
by MrBuddyCasino on Sunday March 19, 2023 @07:46AM
(#35218057)
If you specifically mean RO memory pages, then yes, thats not the same thing. The language and the runtime will enforce collection immutability though, throwing an exception if you attempt to mutate. Poking at the underlying byte code will defeat this, of course.
You can also look at what kinds of things are allowed in class constant pools; you will not find any collections.
https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.ht...