javaSE-验证码生成
一、使用Math类的radom() 方法
//生成验证码 String verifcationCode = ""; for (int i = 0; i <= 5; i++) { double random = 10 * Math.random(); verifcationCode = verifcationCode + Integer.toString((int) random); }
二、使用
一、使用Math类的radom() 方法
//生成验证码 String verifcationCode = ""; for (int i = 0; i <= 5; i++) { double random = 10 * Math.random(); verifcationCode = verifcationCode + Integer.toString((int) random); }
二、使用