看见你的回答就知道高手 The left-hand side of an assignment must be a variable?dbString schoolingLength = request.getParameter("schooling_length");Double db = Double.parseDouble(schoolingLength);=1){}%>
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 02:06:14
看见你的回答就知道高手 The left-hand side of an assignment must be a variable?dbString schoolingLength = request.getParameter("schooling_length");Double db = Double.parseDouble(schoolingLength);=1){}%>
看见你的回答就知道高手 The left-hand side of an assignment must be a variable?db
String schoolingLength = request.getParameter("schooling_length");
Double db = Double.parseDouble(schoolingLength);
=1){
}
%>
看见你的回答就知道高手 The left-hand side of an assignment must be a variable?dbString schoolingLength = request.getParameter("schooling_length");Double db = Double.parseDouble(schoolingLength);=1){}%>
这段程序有问题.
Double.parseDouble(schoolingLength 得到的是一个double变量
而左Double db所赋值的是Double变量,变量类型不一致导致不能赋值.
double是基本数据类型,而Double是封装的对象类型,这是不同的数据类型
你只要把Double db = Double.parseDouble(schoolingLength);改为
double db = Double.parseDouble(schoolingLength);
编译就能通过
我晕.高手来回答吧.我是路过的。