🚜2. total mass of characters
Integer totalMass = characters
.stream()
.mapToInt(Person::getMass)
.sum();
Last updated
Was this helpful?
Integer totalMass = characters
.stream()
.mapToInt(Person::getMass)
.sum();
Last updated
Was this helpful?