String a=request.getParameter("qzdghl");
double a1=Double.parseDouble(a);
String b=request.getParameter("qprice");
double b1=Double.parseDouble(b);
String c=request.getParameter("qservice");
double c1=Double.parseDouble(c);
String d=request.getParameter("qmoral");
double d1=Double.parseDouble(d);
double e=a1+b1+c1+d1;
需要改成
String a=request.getParameter(qzdghl);
double a1=Double.parseDouble(a);
String b=request.getParameter(qprice);
double b1=Double.parseDouble(b);
String c=request.getParameter(qservice);
double c1=Double.parseDouble(c);
String d=request.getParameter(qmoral);
double d1=Double.parseDouble(d);
double e=a1+b1+c1+d1;
也就是把“”去掉,qprive这些都是保存double类型的变量吧,你加上引号就都变成string字符串了,所以出错
◆◆
评论读取中....
请登录后再发表评论!
◆◆
修改失败,请稍后尝试