当前位置: 技术问答>java相关
double in_sum=double.parseDouble(in_sum1);有错?
来源: 互联网 发布时间:2015-06-30
本文导语: String in_sum1=request.getParameter("in_sum"); double in_sum=double.parseDouble(in_sum1); 出现以下提示: C:beawlserver6.1configmydomainapplicationsDefaultWebAppWEB-INF_tmp_war_myserver_myserver_DefaultWebAppjsp_servlet_livenet_shop__addorder.java:193: class expected pr...
String in_sum1=request.getParameter("in_sum");
double in_sum=double.parseDouble(in_sum1);
出现以下提示:
C:beawlserver6.1configmydomainapplicationsDefaultWebAppWEB-INF_tmp_war_myserver_myserver_DefaultWebAppjsp_servlet_livenet_shop__addorder.java:193: class expected
probably occurred due to an error in /livenet/shop/AddOrder.jsp line 84:
double in_sum=double.parseDouble(in_sum1);
C:beawlserver6.1configmydomainapplicationsDefaultWebAppWEB-INF_tmp_war_myserver_myserver_DefaultWebAppjsp_servlet_livenet_shop__addorder.java:193: incompatible types
probably occurred due to an error in /livenet/shop/AddOrder.jsp line 84:
double in_sum=double.parseDouble(in_sum1);
double in_sum=double.parseDouble(in_sum1);
出现以下提示:
C:beawlserver6.1configmydomainapplicationsDefaultWebAppWEB-INF_tmp_war_myserver_myserver_DefaultWebAppjsp_servlet_livenet_shop__addorder.java:193: class expected
probably occurred due to an error in /livenet/shop/AddOrder.jsp line 84:
double in_sum=double.parseDouble(in_sum1);
C:beawlserver6.1configmydomainapplicationsDefaultWebAppWEB-INF_tmp_war_myserver_myserver_DefaultWebAppjsp_servlet_livenet_shop__addorder.java:193: incompatible types
probably occurred due to an error in /livenet/shop/AddOrder.jsp line 84:
double in_sum=double.parseDouble(in_sum1);
|
可能是request.getParameter("in_sum");返回null值
在取之前判断一下如
if (request.getParameter("in_sum")!=null){
String in_sum1=request.getParameter("in_sum");
double in_sum=double.parseDouble(in_sum1);
}
在取之前判断一下如
if (request.getParameter("in_sum")!=null){
String in_sum1=request.getParameter("in_sum");
double in_sum=double.parseDouble(in_sum1);
}