java的RandomUtils问题

想按照这个程序写一下,图片描述但是会没有这个方法。

我只找到了lang3这个包没有找到lang这个包,图片描述怎么就不能用了呢?图片描述
参数类型错误。

回答:

RandomUtils.next(int n);方法在commons-lang.jar里面
RandomUtils.nextInt(int startInclusive, int endExclusive)在commons-lang3.jar里面
导入commons-lang.jar即可

以上是 java的RandomUtils问题 的全部内容, 来源链接: utcz.com/p/179219.html

回到顶部