日期:2014-05-20  浏览次数:20734 次

Random随机数问题,求解答
怎么样可以用Random产生的10以内的数以01,02.。。的形式输出啊。请给个代码

------解决方案--------------------
import java.util.concurrent.ThreadLocalRandom;
System.out.printf("%02d%n", ThreadLocalRandom.current().nextInt(0,100));

Java 7下运行。