Of particular note, all 1-byte Integers are interned, there is a pool of small Integers from -127 <-> 127 which are reused whenever possible.
I learned this the hard way, when a C++ JNI extension I was working on accidentally overwrote the pooled value for zero, and all hell broke loose...
Yeah - it's a bit non-intuitive you can change the value of a number.
https://thedailywtf.com/articles/Disgruntled-Bomb-Java-Editi...
> Integers from -127 <-> 127
The cache can be extended on startup with env var `java.lang.Integer.IntegerCache.high `
https://github.com/openjdk/jdk/blob/cc278dbb8a1ca0754d584270...