StringBuilder sb=new StringBuilder();
StringBuilder sd=new StringBuilder();
for (int i = 0; i < 2; i++) {
int index1=rd.nextInt(arr1.length);
int index2=rd.nextInt(arr2.length);
sb.append(arr1[index1]);
sd.append(arr2[index2]);
}
System.out.println("验证码为:"+sb+sd);//1
System.out.println(sb+sd);//2
相关分类