六位验证码生成方法

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!
posted @ 2023-06-11 13:01  君莫笑我十年游  阅读(24)  评论(0编辑  收藏  举报