java return only unique values from array code example
Example: java get unique elements from array
String[] unique = Arrays.stream(array).distinct().toArray(String[]::new);
String[] unique = Arrays.stream(array).distinct().toArray(String[]::new);