1----
int i=0;
int j=0;
while(rs.next()){
try{
j=Integer.parseInt(rs.getString(1));
}catch(Exception e){j=0;}
i=i+j;
}
2---------
int i=0;
int j=0;
while(rs.next()){
try{
j=rs.getInt(1);
}catch(Exception e){j=0;}
i=i+j;
}对照你的实际情况进行修改!!!!!!!
int i=0;
int j=0;
while(rs.next()){
try{
j=Integer.parseInt(rs.getString(1));
}catch(Exception e){j=0;}
i=i+j;
}
2---------
int i=0;
int j=0;
while(rs.next()){
try{
j=rs.getInt(1);
}catch(Exception e){j=0;}
i=i+j;
}对照你的实际情况进行修改!!!!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货