> For the complete documentation index, see [llms.txt](https://tvn.gitbook.io/selenium-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tvn.gitbook.io/selenium-java/setup-new-maven-project/2.4.-java-practices/java-stream/java-8-stream-xu-ly-array-list-nhanh-gon/1.-find-person-that-has-mass-greater-than-100/3.-total-height-of-characters.md).

# 3. total height of characters

```java
    Integer totalHeight = characters
                .stream()
                .mapToInt(Person::getHeight)
                .sum();
                
    //using reduce
          Integer heightSum =  characters.stream()
                .reduce(0,(height,person)->height+person.getHeight(),Integer::sum);
        System.out.printf("total height %d",heightSum);            
```
