public static String intListAsString ( List < Integer > ls ) { return String . join ( ", " , ls . stream ( ) . map ( i -> i . toString ( ) ) . collect ( Collectors . toList ( ) ) ) ; }
Converts a list of integers into a comma - separated string .