import java.io.*;
import java.util.*;public class Tagao
{
public static void main(String[] args)throws IOException
{
System.out.println("请输入N精,N提,进料板的开度h0以及板距HT!!");
System.out.println("根据本设计的条件,几经计算出N精为24,N提为4,开口高度hO=0.8,板间距HT=0.45!!!");
StringTokenizer str;
DataInputStream is=new DataInputStream(System.in);
String sLine;
sLine=is.readLine();
str=new StringTokenizer(sLine);
double NJ=new Double(str.nextToken()).douleValue();
double NT=new Double(str.nextToken()).douleValue();
double h0=new Double(str.nextToken()).douleValue();
double HT=new Double(str.nextToken()).douleValue();
//精馏段的有效高度
double Z1=(NJ-1)*HT;
System.out.println("精馏段的有效高度Z1="+Z1);
//提馏段的有效高度
double Z2=(NT-1)*HT;
System.out.println("提馏段的有效高度Z2="+Z2);
//精馏塔的有效高度
double Z=Z1+Z2+0.8;
System.out.println("精馏段的有效高度Z="+Z);
}
}
为什么Java编译时返回"cannot resolve symbol symbol : method doubleValue location : class java.lang.Double"的错误?
多谢!
import java.util.*;public class Tagao
{
public static void main(String[] args)throws IOException
{
System.out.println("请输入N精,N提,进料板的开度h0以及板距HT!!");
System.out.println("根据本设计的条件,几经计算出N精为24,N提为4,开口高度hO=0.8,板间距HT=0.45!!!");
StringTokenizer str;
DataInputStream is=new DataInputStream(System.in);
String sLine;
sLine=is.readLine();
str=new StringTokenizer(sLine);
double NJ=new Double(str.nextToken()).douleValue();
double NT=new Double(str.nextToken()).douleValue();
double h0=new Double(str.nextToken()).douleValue();
double HT=new Double(str.nextToken()).douleValue();
//精馏段的有效高度
double Z1=(NJ-1)*HT;
System.out.println("精馏段的有效高度Z1="+Z1);
//提馏段的有效高度
double Z2=(NT-1)*HT;
System.out.println("提馏段的有效高度Z2="+Z2);
//精馏塔的有效高度
double Z=Z1+Z2+0.8;
System.out.println("精馏段的有效高度Z="+Z);
}
}
为什么Java编译时返回"cannot resolve symbol symbol : method doubleValue location : class java.lang.Double"的错误?
多谢!
楼主【skyseek】截止到2008-07-02 04:59:19的历史汇总数据(不包括此帖):
发帖的总数量:1 发帖的总分数:100
结贴的总数量:0 结贴的总分数:0
无满意结贴数:0 无满意结贴分:0
未结的帖子数:1 未结的总分数:100
结贴的百分比:0.00 % 结分的百分比:0.00 %
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
doubleValue你少写了一个字母吧!