java creating object suggestion
<p>I have some doubts/questions regarding the object creation. I have heard that
objects should not be created in the loop. Whats wrong with the creation of 
objects inside the loop? Whats the difference between creating  outside the loop
and creating inside the loop?</p>

<p>Please consider the following example.</p>

<pre><code>public java.util.List&lt;Object&gt; objectCreationTest(){
    java.util.List&lt;Object&gt; objectList =new java.util. ArrayList&lt;Object&gt;();
    Object obj = null;
    for(int i = 0 ; i &lt;1000;i++){
        Object e = new Object(); //1 --&gt;  Is this object creation wrong? 
        obj = new Object(); //2 --&gt; Is this right way to create?
        objectList.add(e );

    }

    return objectList ;

}
</code></pre>

<p>Please suggest me which way I have to follow? </p>
