(String[] args)
| 9 | |
| 10 | public class ListOfInt { |
| 11 | public static void main(String[] args) { |
| 12 | List<Integer> li = IntStream.range(38, 48) |
| 13 | .boxed() // Converts ints to Integers |
| 14 | .collect(Collectors.toList()); |
| 15 | System.out.println(li); |
| 16 | } |
| 17 | } |
| 18 | /* Output: |
| 19 | [38, 39, 40, 41, 42, 43, 44, 45, 46, 47] |