Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get average of all the array items android

private double calculateAverage(List <Integer> marks) {
    return marks.stream()
                .mapToDouble(d -> d)
                .average()
                .orElse(0.0)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #average #array #items #android
ADD COMMENT
Topic
Name
3+8 =