标签:new dom 随机数 span and family 随机 next mat
1、Random
import java.util.Random;
int i = new Random().nextInt(4);
2、Math
int i = (int)(Math.random()*4); //Math.random = [0, 1)
取随机数
原文地址:https://www.cnblogs.com/ss-123/p/8973407.html