首先先要导入
import java.util.Random;
生成一个随机数
Random rnd=new Random();
若数的范围为0~500000000
tmp=rnd.nextInt(500000000);