1 <p>A boxed primitive is allocated just to call toString(). It is more effective to just use the static
2 form of toString which takes the primitive value. So,</p>
4 <tr><th>Replace...</th><th>With this...</th></tr>
5 <tr><td>new Integer(1).toString()</td><td>Integer.toString(1)</td></tr>
6 <tr><td>new Long(1).toString()</td><td>Long.toString(1)</td></tr>
7 <tr><td>new Float(1.0).toString()</td><td>Float.toString(1.0)</td></tr>
8 <tr><td>new Double(1.0).toString()</td><td>Double.toString(1.0)</td></tr>
9 <tr><td>new Byte(1).toString()</td><td>Byte.toString(1)</td></tr>
10 <tr><td>new Short(1).toString()</td><td>Short.toString(1)</td></tr>
11 <tr><td>new Boolean(true).toString()</td><td>Boolean.toString(true)</td></tr>