Java - Sequence

About

Integer

From a stream of integer (ie a IntStream)

List<Integer> sequence = IntStream.range(0, 10).boxed().collect(Collectors.toList());
System.out.println(sequence);
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Character

5 questions mark

List<String> values = 
      IntStream.of(5)
      .mapToObj(s -> "?")
      .collect(Collectors.toList());

Powered by ComboStrap