在线急候:Vector里取出值的计算问题!
<td><%=item.get("price")%></td>
<td><%=item.get("number")%></td>
取出Vector里的两个值,price是float型,number是int型
现在要计算一个总金额,这两个值怎么乘起来啊?总是报不匹配。
我试过这样:
totalprice1 = ((Float)item.get("price")).floatValue()*((Integer)item.get("number")).intValue();
似乎没有(Float)这个值是吧??
报的错是:error java.lang.String