我这样转出错了
result = (float)(num_elect/sqrt(num_elect + num_apex_paddy));
result = (float)(num_elect/sqrt(num_elect + num_apex_paddy));
解决方案 »
- 关于从IFrame中取值的问题
- 请问在注册时,检查用户名是否存在怎么写!可以用servlet吗?
- jsp 设置 下拉框的问题
- spring 的范例jpetstore中的annotation,attributes,client三个文件夹中的文件是干什么用的?
- java.lang.IllegalStateException: forward() not allowed after buffer has committed.页面跳转异常?如何解决?
- 与客户的合同草稿,新手,请多多指教,如有可能,并求合作者。
- resin不能启动,(100分求救)请高手指点,不够再加!
- 杀死一个线程的语句或者方法是什么?
- tomcat 配置的问题 请指教!
- Struts中如何在两个Form之间传递数据?
- 请问有没有好的打印方式?
- 关于NullPointerException异常的排除
String a=String.valueOf(num_elect/sqrt(num_elect + num_apex_paddy));
然后
float b=Float.parseFloat(a);
Double(d).floatValue() ------------------------------------------------------
我们还年轻牛奶会有的奶牛也会有的
可天天在 csdn 混这些会有吗 ??
public float Calculate_power_factor(float number_electron,float number_apex_paddy){
float result;
double num_elect;
double num_apex_paddy;
double res; num_elect = (double)number_electron;
num_apex_paddy = (double)number_apex_paddy; res = num_elect/sqrt(num_elect * num_elect + num_apex_paddy * num_apex_paddy);
result = (float)res;
return result;
}出错如下:
C:\bea\user_projects\119\Alert\.wlnotdelete\DefaultWebApp_DefaultWebApp_4795646\jsp_servlet\__e_input_otherunits_electrodata.java:143: cannot resolve symbol
probably occurred due to an error in /E_input_Otherunits_electrodata.jsp line 74:
res = num_elect/sqrt(num_elect * num_elect + num_apex_paddy * num_apex_paddy);
public float Calculate_power_factor(float number_electron,float number_apex_paddy){
float result;
double num_elect;
double num_apex_paddy;
double res; num_elect = (double)number_electron;
num_apex_paddy = (double)number_apex_paddy; res = num_elect/sqrt(num_elect * num_elect + num_apex_paddy * num_apex_paddy);
result = (float)res;
return result;
}出错如下:
C:\bea\user_projects\119\Alert\.wlnotdelete\DefaultWebApp_DefaultWebApp_4795646\jsp_servlet\__e_input_otherunits_electrodata.java:143: cannot resolve symbol
probably occurred due to an error in /E_input_Otherunits_electrodata.jsp line 74:
res = num_elect/sqrt(num_elect * num_elect + num_apex_paddy * num_apex_paddy);