Does the object variable create an instance of the object while using a for-each loop in Java?
<p>I am using the following code to add a new <code>StockRecord</code> to my <code>stockRecords</code> collection. StockRecord extends Stock.</p>

<pre><code>for (Stock s : stock) {
     stockRecords.add(new StockRecord(s.get_storeID(),
     s.get_sku(), s.get_itemCount()));
}
</code></pre>

<p>I have a println statement in the constructors of both <code>Stock</code> and <code>StockRecord</code>. When I run this code, I get the following output:</p>

<pre><code>Stock()
StockRecord()
Stock()
StockRecord()
Stock()
StockRecord()
Stock()
StockRecord()
</code></pre>

<p>Does using the variable <code>s</code> in the for-each loop actually create an instance of <code>Stock</code>?</p>
