Slide 10
Slide 10 text
@rodrigograciano @nehasardana09
Collections – Factory Methods
u Reduce the “boilerplate”
u Return Immutable collections
u List numbers = List.of(1,2,3);
u Set cities = Set.of(”New York City", ”Boston”);
u Map m2 =
Map.ofEntries(
Map.entry("A",1),
Map.entry("B",2)
);
9