java常用工具类[待补充]

 生成指定范围指定大小的随机数:

1 String code = String.valueOf((int)(Math.random()*(9999-1000+1))).substring(0,4); 

posted @ 2018-02-08 18:15  夜旦  阅读(110)  评论(0编辑  收藏  举报