Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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));

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ocurrences #array #java
ADD COMMENT
Topic
Name
3+8 =