importjava.util.*;publicclassMain{publicstaticvoidmain(String[]args){Scannersn=newScanner(System.in);Stringa=sn.next();Stringb=sn.next();char[]aa=a.toCharArray();char[]bb...
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sn=new Scanner(System.in);
String a=sn.next();
String b=sn.next();
char []aa=a.toCharArray();
char []bb=b.toCharArray();
for(int i=0;i
{
if(aa[i]<97)
{
aa[i]=(char) (aa[i]+32);
}
}
for(int i=0;i
{
if(bb[i]<97)
{
bb[i]=(char) (bb[i]+32);
}
}
//System.out.print(aa);
int []aa_times=new int[26];
for(int i=0;i
{
aa_times[(int)aa[i]-'a']+=1;
}
int []bb_times=new int[26];
System.out.print(aa_times);
}
}
输入:ABBCddEGGh
fsdfsdfsdf
输出永远是这个:[I@28d93b30
why?
展开