List<Integer> list1 = Arrays.asList(1, 2); List<Integer> list2 = Arrays.asList(4, 5); Stream.of(list1, list1) .flatMap(list -> list.stream()) .forEach(System.out::println);