+ 4
It dawned on me! #1
In Java, there is a pool of integers in the interval [-128; 127]. If we create an Integer in this gap, then instead of creating a new object each time, the JVM takes them from the pool. So you can see it clearly in 3 examples below: https://code.sololearn.com/cwnc0SvIt48v/# If you want me to post another interesting things like this, give me a like!
1 Réponse
+ 7
nice, thanks for sharing 👍 😃