com.jladder.lang.R Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jladder Show documentation
Show all versions of jladder Show documentation
with java,a low code SDK,通用低代码开发包
package com.jladder.lang;
import java.util.concurrent.ThreadLocalRandom;
/***
* 随机数据操作类
*/
public class R {
///
/// 取随机数
///
///
///
///
public static int random(int min, int max)
{
return ThreadLocalRandom.current().nextInt(min, max);
}
///
/// 取随机数
///
/// 长度
///
public static String random(int length)
{
StringBuilder sb=new StringBuilder();
for (int i = 0; i < length; i++)
{
sb.append(random(0,9) + "");
}
return sb.toString();
}
}