Answers for "write a program to find the sum and product of all elements of an array in java"

2

sum of all numbers in array java

int[] a = {10,20,30,40,50};
int sum = IntStream.of(a).sum();
System.out.println("The sum is " + sum);
Posted by: Guest on December-11-2020

Code answers related to "write a program to find the sum and product of all elements of an array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language