DZone

Should you be concerned about temporary Java objects or can the JVM eliminate them for you, maybe by replacing them with implicit static instances?

Consider the following example:

Source: DZone