doubleValue这个方法在哪里?
他的返回值是什么?

解决方案 »

  1.   

    double doubleValue() 
              Returns the double value of this Double object.
      

  2.   

    把double doubleValue()也贴出来
      

  3.   

    import  java.util.*;class Tstack 
    {
    public static void main(String[] args) 
    {
    Stack s = new Stack();
    Integer a1 = new Integer("123");
    s.push(a1);
    Double a2 = new Double("23.323");
    s.push(a2);
    Double a3 = (Double)s.pop();
    double a33 =a3.doubleValue();
    Integer a4 = (Integer)s.pop();
    double a44 = a4.doubleValue();
    double a5 = a33 + a44;
    System.out.print(a5);

    }
    }
    以上应该是你的程序的本意吧。
    关键是你把 doubleValue()这个方法用错了;
    还有,堆栈应该是先弹出这个 Double 吧~~