关于java中random.nextInt()的问题

各位大佬,我这里为啥会报错呢?
```random rand3=new random();
int one=rand3.nextInt(10);
int two=rand3.nextInt(10);
int three=rand3.nextInt(10);
int four=rand3.nextInt(10);
int five=rand3.nextInt(10);
System.out.println(one+1);

报错的点在后面rand3.nextInt(10);这片
我上面有一段和这里类似的就不会报错

```Random rand = new Random();
        int month = rand.nextInt(12);

这段代码就没有报错,想问下是为什么呢?感谢大家图片说明

java里有两个random类
java.long.Math.random 和 java.util.Random
区别是开头大小写不同
你是不是搞混淆了。