标签:os ar java for sp 代码 ef bs new
//------------------------------------------------------------------------------------------------------
生成四位随即验证码
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
StringBuilder s = new StringBuilder();
int len = 4;
for(int i=0;i<=len;i++){
Random r = new Random();
int p = r.nextInt(str.length());
s.append(str.charAt(p));
}
System.out.println(s.toString());
//------------------------------------------------------------------------------------------------------
标签:os ar java for sp 代码 ef bs new
原文地址:http://www.cnblogs.com/xiaosen992608/p/4037596.html