Programming Trick's
12/08/2017
Program to count the occurrence characters in the string.
void countCharOccurenceInString(String str){
char[] chars=str.toCharArray();
HashMap charCountMap= new HashMap();
for(char charStr:chars){
if(charCountMap.containsKey(charStr)){
charCountMap.put(charStr, charCountMap.get(charStr)+1);
}else{
charCountMap.put(charStr, 1);
}
}
System.out.println(charCountMap);
}
Want your business to be the top-listed Computer & Electronics Service in Pune?
Click here to claim your Sponsored Listing.
Click here to claim your Sponsored Listing.
Category
Contact the business
Telephone
Website
Address
Pune
411016