Skip to content

Instantly share code, notes, and snippets.

@yavuztas
Last active August 27, 2019 15:19
Show Gist options
  • Save yavuztas/dd20af59f57da2a4bae1981776e36a4e to your computer and use it in GitHub Desktop.
Save yavuztas/dd20af59f57da2a4bae1981776e36a4e to your computer and use it in GitHub Desktop.
public static List<Integer> toList(int[] array) {
return Arrays.stream(array).boxed().collect(Collectors.toList());
}
public static List<Long> toList(long[] array) {
return Arrays.stream(array).boxed().collect(Collectors.toList());
}
public static List<Double> toList(double[] array) {
return Arrays.stream(array).boxed().collect(Collectors.toList());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment