You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package com.util;
|
|
/**
|
|
* 验证码生成类
|
|
*/
|
|
import java.util.Random;
|
|
|
|
public class CheckCode {
|
|
|
|
public String getCheckCode(){
|
|
Random random = new Random();
|
|
String sRand="";
|
|
for (int i=0;i<4;i++){
|
|
String rand=String.valueOf(random.nextInt(10));
|
|
sRand+=rand;
|
|
}
|
|
return sRand;
|
|
}
|
|
}
|