String str="abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ0123456789";
Random r=new Random();
String arr[]=new String [4];
String b="";
for(int i=0;i<4;i++)
{
int n=r.nextInt(62);
arr[i]=str.substring(n,n+1);
b+=arr[i];
}
System.out.print("请输入验证码:"+b);