1import java.util.Arrays;
2import java.util.List;
3import java.util.stream.Collectors;
4
5public class Main
6{
7 public static void main(String[] args)
8 {
9 List<String> listOfStrings = Arrays.asList("1", "2", "3", "4", "5");
10
11 List<Integer> listOfIntegers = listOfStrings.stream()
12 .map(Integer::valueOf)
13 .collect(Collectors.toList());
14
15 System.out.println(listOfIntegers);
16 }
17}
18