I'm brand new to to Java and looking with some help. I have an array list as follows:
double number[]={19.1904990290,27.2646233344,51.4850317134}
I've used the following code to sum the array list and print it to the console:
int sumLeft = 0;
System.out.println("Contents of leftside: " + number);
for(double i: number) sumLeft += i;
System.out.println("sum(left) = " + sumLeft);
and my result is 97. My question is how can I carry this out so my answer is correct?