Escape Analysis in HotSpot: When new Object() Doesn’t Actually Create an Object

It is always important to be mindful of performance when writing code. In fact, once you care about performance, you easily notice areas in the code that need improvement, and at times even very small things look expensive. Sometimes, however,…
