Skip to content

Instantly share code, notes, and snippets.

@yavuztas
Last active August 27, 2019 15:20
Show Gist options
  • Save yavuztas/fc6658210418ff2ecd8d36c19d6dca5c to your computer and use it in GitHub Desktop.
Save yavuztas/fc6658210418ff2ecd8d36c19d6dca5c to your computer and use it in GitHub Desktop.
public static <T> Set<T> toSet(T[] array) {
return Arrays.stream(array).collect(Collectors.toSet());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment