SyntaxFix
Write A Post
Hire A Developer
Questions
Java 8:
String[] strArray = {"eins", "zwei", "drei", "vier"}; Set<String> strSet = Arrays.stream(strArray).collect(Collectors.toSet()); System.out.println(strSet); // [eins, vier, zwei, drei]