import java.util.*; public class Main { public static void main(String[] args) { List<Integer> list = Arrays.asList(1, 2, 3, 4, 5); list.stream().map(x -> x + 1).forEach(System.out::println); } }