// RUNTIME_WITH_FULL_JDK import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; class Test { public void main(List lst) { List streamOfList = lst.stream() .map(x -> x + "e") .collect(Collectors.toList()); List streamOfElements = Stream.of(1, 2, 3) .map(x -> x + 1) .collect(Collectors.toList()); Integer[] array = {1, 2, 3}; List streamOfArray = Arrays.stream(array) .map(x -> x + 1) .collect(Collectors.toList()); List streamOfArray2 = Stream.of(array) .map(x -> x + 1) .collect(Collectors.toList()); List streamIterate = Stream.iterate(2, v -> v * 2) .map(x -> x + 1) .collect(Collectors.toList()); List streamGenerate = Stream.generate(() -> 42) .map(x -> x + 1) .collect(Collectors.toList()); } }