Dynamic generation of objects in java
<pre><code>HashSet&lt;String&gt; outScopeActiveRegionCodeSet=new HashSet&lt;String&gt;();
for (String regionCode : outScopeActiveRegionCodeSet) {
    //code required
}   
</code></pre>

<p>Here i need to create new TransactionLOgDTO objects dynamically insed the loop like below.If there are 3     regioncodes in hashset i need 3 TransactionLOgDTO objects with regionCode appended to name of new object.</p>

<pre><code>TransactionLOgDTO regionCode1DTO=new TransactionLOgDTO(); 

}
</code></pre>

<p>I need something like this to be done........................... </p>

<pre><code>for (String regionCode : outScopeActiveRegionCodeSet) { TransactionLOgDTO "regionCode"+DTO=new TransactionLOgDTO(); } 
</code></pre>
