Double dou=conveyorOverspeedService.getLineMan(map);
conveyorOverspeed.setLine(dou);
public void setLine(double line) {
this.line = line;
} 提示错误The method setLine(double) in the type ConveyorOverspeed is not applicable for 
 the arguments (Double)

解决方案 »

  1.   

    这个
    java.lang.Double
    The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double. In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double. Author:
    Lee Boynton
    Arthur van Hoff
    Since:
    JDK1.0
    @version
    1.82, 01/23/03难道和这个不一样吗
    private double line;
      

  2.   

    还有这样的错误 public int deptDailyJob_nextSeq(DeptDailyJob deptDailyJob) {
    return (Integer)executeQueryForObject("deptDailyJob_nextSeq", deptDailyJob);
    }  Type mismatch: cannot convert from Integer to int
    以前用的是jdk1.5
    现在换成1.4了
      

  3.   

    jdk1.5后的版本可以自动转.
      

  4.   

    1.5之前可以这样:
    conveyorOverspeed.setLine(dou.doubleValue());
      

  5.   

    这几个问题一样,自己转换一下就可以了.
    比如Integer对象调用intValue()方法得到对应的int值
      

  6.   

    楼主的jdk版本的问题,以前的不支持Double直接赋值给double
      

  7.   

    还是jdk的版本问题.如果要兼容以前的就必须把它转成一样的.1.5版本或以后的会自己转.
      

  8.   

    box unbox 是 1.5加入的功能。
      

  9.   

    box unbox 是 1.5加入的功能。如果换到JDK1.4下,要自己进行类型转换的
      

  10.   

    把第一个Double改成double就可以了,Double是double的包装类这两个还是有些差别的,记得包装类好像是不能直接参与运算的,需要转换成相应的数据类型,比如Integer要参与运算要转换为int....
      

  11.   

    我现在才发现这个问题是因为JDK导致的··唉··悲剧了··