mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
19 lines
340 B
Java
19 lines
340 B
Java
// "Replace with sum()" "true"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
interface Person {
|
|
double getAge();
|
|
}
|
|
|
|
public double test(List<Person> collection) {
|
|
double d = 0;
|
|
for(Person person : collec<caret>tion) {
|
|
if(person.getAge() == 10)
|
|
continue;
|
|
d = d + person.getAge();
|
|
}
|
|
return d;
|
|
}
|
|
} |