This is my question .
I am working on a Third Party API whose return value is of type Enumeration.
So I am passing the Enumeration result to a method as shown below
Please let me know if this is valid code or not?
private Data loadData(Enumeration rs, Data data)
{
while (rs.hasMoreElements())
{
// Process it
}
}
Thanks in advance.
Yes it is valid.
Enumerationis a normal Java type and you pass an instance of theEnumerationclass.