//统计字符个数
public static Map countLetter(String args)
{
char a[]=args.toCharArray();
HashMap<Character,Integer> conditionMap=new HashMap<Character,Integer>();
for(int i=0;i<a.length;i++)
{
if(!conditionMap.containsKey(a[i]))
{
conditionMap.put(a[i],1);
}else
{
Integer oldnum=(Integer)conditionMap.get(a[i]);
int newnum=oldnum.intValue()+1;
conditionMap.put(a[i],newnum);
}
}
return conditionMap;
}
public static Map countLetter(String args)
{
char a[]=args.toCharArray();
HashMap<Character,Integer> conditionMap=new HashMap<Character,Integer>();
for(int i=0;i<a.length;i++)
{
if(!conditionMap.containsKey(a[i]))
{
conditionMap.put(a[i],1);
}else
{
Integer oldnum=(Integer)conditionMap.get(a[i]);
int newnum=oldnum.intValue()+1;
conditionMap.put(a[i],newnum);
}
}
return conditionMap;
}