public class Test10 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String s ;
int i,j;
int counts[] = new int[10];
s=in.nextLine();
for(j=0;j<=9;j++){
counts[j]= 0;
for(i=0;i
counts[j]++;
System.out.println("counts["+j+"]"+"="+counts[j]);
}
}
}
上代码,我给你看看。