Answers for "get ocurrences in array java"

0

get ocurrences in array java

List asList = Arrays.asList(array);
Set<String> mySet = new HashSet<String>(asList);
for(String s: mySet){

 System.out.println(s + " " +Collections.frequency(asList,s));

}
Posted by: Guest on September-01-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language