by wpollock · 3w ago · 0 comments
I believe Java caches Integer objects for values -128..+128, not 256. But that may be an implementation detail, and not something to count on.
We both misremembered. I found where this is documented and the range is -128..127 inclusive: <https://docs.oracle.com/en/java/javase/27/docs/api/java.base...>
I'm looking forward to structured concurrency in Java 28. I already thought of a title for my article "Java Concurrency - Past, Present, and Futures".