Write a program to initialize an array 'list'
with 10 numbers display the product of odd index in Java.
Answers
Answered by
1
Answer:
Explanation:
// include java.util.*
List<Integer> numList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
Integer sumValue = numList.stream().mapToInt(Integer::intValue).sum();
System.out.println(sumValue);
Similar questions
Math,
1 day ago
Environmental Sciences,
1 day ago
Computer Science,
3 days ago
English,
8 months ago
Math,
8 months ago