package day6
;
public class lianxi2
{
public static void main(String
[] args
)
{
char[] arr
= {'a','l','f','m','f','o','b','b','s','n'};
int[] counts
= new int[26];
for(int i
=0; i
<arr
.length
; i
++)
{
counts
[arr
[i
]-97]++;
}
for(int i
=0; i
<counts
.length
; i
++)
System
.out
.println((char)(i
+97) + "--" + counts
[i
]);
}
}
转载请注明原文地址:https://tech.qufami.com/read-5371.html