hy, you are adding variable of primitive data type into newList. this is incorrect
double sum = 0; newList.add(sum); sum = 0;
you have declared a ArrayList of Double data type ArrayList newList = new ArrayList();
but you are adding newList.add(sum) where sum is a primitive data type of long.
Fix
you have to insert object of Double data type for each multiplication result.
newList.add(new Double(sum));