sandeepmur
Programmer
Hi,
I have an enumeration in a code I am trying to debug. .something like:
for (Enumeration vals = attr.getAll();vals.hasMoreElements()
{
out.println (vals.nextElement()+ "<br>");
//String nval = (String)vals.nextElement();
}
The above works fine and prints all the elements but If I try to cast the elements into Strings as seen in the commented line, the code stops execution after the first print statement.
Whats wrong here ??
tia
I have an enumeration in a code I am trying to debug. .something like:
for (Enumeration vals = attr.getAll();vals.hasMoreElements()
{
out.println (vals.nextElement()+ "<br>");
//String nval = (String)vals.nextElement();
}
The above works fine and prints all the elements but If I try to cast the elements into Strings as seen in the commented line, the code stops execution after the first print statement.
Whats wrong here ??
tia