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

Method max

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

Source from the content-addressed store, hash-verified

15 }
16
17 @Test
18 public void max() {
19 List<Integer> numbers = List.of(1, 2, 3, 100, 23, 93, 99);
20 Integer max = numbers.stream().max(Comparator.naturalOrder()).get();
21 System.out.println(max);
22 }
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected