hi,
this is the way i have made the declarations
List AHVSalaryList=new ArrayList();
AHVSalaryList.add(new Double(PersonBean.getAHVSalary()));
and getAHVSalary() returns double.
double AHVSalarySum = 0.0;
but when i do AHVSalarySum=AHVSalarySum+(Double)AHVSalaryList.get(i).doubleValue();
it gives the following error.
Incompatible type for +. Can't convert java.lang.Double to double.
AHVSalarySum=AHVSalarySum+(Double)AHVSalaryList.get(i).doubleValue();
^
Method doubleValue() not found in class java.lang.Object.
AHVSalarySum=AHVSalarySum+(Double)AHVSalaryList.get(i).doubleValue();
can anyone help me?
thanx
Rabix
this is the way i have made the declarations
List AHVSalaryList=new ArrayList();
AHVSalaryList.add(new Double(PersonBean.getAHVSalary()));
and getAHVSalary() returns double.
double AHVSalarySum = 0.0;
but when i do AHVSalarySum=AHVSalarySum+(Double)AHVSalaryList.get(i).doubleValue();
it gives the following error.
Incompatible type for +. Can't convert java.lang.Double to double.
AHVSalarySum=AHVSalarySum+(Double)AHVSalaryList.get(i).doubleValue();
^
Method doubleValue() not found in class java.lang.Object.
AHVSalarySum=AHVSalarySum+(Double)AHVSalaryList.get(i).doubleValue();
can anyone help me?
thanx
Rabix