Java: Passing an Enumeration to a Method
<p>This is my question . </p>

<p>I am working on a Third Party API whose return value is of type Enumeration.</p>

<p>So I am passing the Enumeration result to a method as shown below </p>

<p>Please let me know if this is valid code or not?</p>

<pre><code>private Data loadData(Enumeration rs, Data data) 
{
while (rs.hasMoreElements()) 
{
// Process it 
}
}
</code></pre>

<p>Thanks in advance.</p>
