MCPcopy Create free account
hub / github.com/amigoscode/java-streams / min

Method min

src/test/java/com/amigoscode/examples/MinMax.java:10–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8public class MinMax {
9
10 @Test
11 public void min() {
12 List<Integer> numbers = List.of(1, 2, 3, 100, 23, 93, 99);
13 Integer min = numbers.stream().min(Comparator.naturalOrder()).get();
14 System.out.println(min);
15 }
16
17 @Test
18 public void max() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected