if(locs!=null)
{
System.out.println("location are not null");
Iterator ite = locs.iterator();
DefaultComboItem locObj = null;
ArrayList locCode = null;
String cod=null;
String name=null;
while(ite.hasNext())
{
locCode = (ArrayList) ite.next();
Iterator iter = locCode.iterator();
while(iter.hasNext())
{
cod=(String)iter.next();
System.out.println("Code="+cod);
name=(String)iter.next();
System.out.println("name="+name);
locObj = new DefaultComboItem(cod, name);
colRet.add(locObj);
}
}
}
上面代码执行我收到 “java.lang.reflect.InvocationTargetException” 混得 COD =(字符串)iter.next()此异常; 行,因为iter.next();返回BigDecimal值,我转换成字符串变量java.lang.reflect.InvocationTargetException在Java中
请帮我
没有想法在哪里?没有堆栈跟踪或行号或任何东西? – 2010-05-27 09:58:37
可能是如何不问问题的一个很好的例子。 你能提供上下文吗?你正在使用哪个库,哪条线发生异常,堆栈跟踪? – 2010-05-27 10:00:17