六位验证码生成方法

发布时间 2023-06-11 13:08:00作者: 曾鸿发
public static void main(String[] args) {
    // 获取随机数
    double mathRandom = (Math.random()*9 + 1) * (Math.pow(10,5)):
    System.out.printin(mathRandom);
    int resultInt = (int)mathRandom;
    System.out.printin(resultInt);
}
End!