Initialization List with values in one row in Java

Java 9: List.of(“a”, “b”, “c”); Set.of(“a”, “b”, “c”); Java 8: Stream.of(“a”, “b”, “c”).collect(Collectors.toList()); Stream.of(“a”, “b”, “c”).collect(Collectors.toCollection(ArrayList::new)); Older: Collections.singletonList(); Arrays.asList(); new ArrayList() {{ add(“a”); add(“b”); add(“c”); }};