where stateb is List'' bucket is a two dimensional array
statesb= IntStream.of(bucket[j-1]).boxed().collect(Collectors.toList());
with import java.util.stream.IntStream;
see https://examples.javacodegeeks.com/core-java/java8-convert-array-list-example/