Using an enhanced for loop, complete the code to achieve the stated goal. 1) Cal
ID: 3912799 • Letter: U
Question
Using an enhanced for loop, complete the code to achieve the stated goal. 1) Calculate the sum of all values within the sensorReadings array double sumvaï = 0.0; for (double readingVal sensorReadings) sumVal- Check Show answer 2) Print each double within the array interestRates for : interestRates) system.out.println (theRate"") Check Show answer 3) Compute the product of all int elements within the array primeNumbers int primeProduct-1; for (int theNumber primeProduct -primeProduct theNumber Check Show answerExplanation / Answer
The syntax of for-each loop is :
for(data_type item: collection) {
}
1)
2)
3)