package cn.jhd.lwj;
import java.util.Random;
/**
- @Author :CrazyBarrett
- @Date :2021/3/6 21:00
- @Version :1.0
*/
public class YanZhengMa {
public static void main(String[] args) {
// 原理
// int d = 100;
// char c = (char) d;
// System.out.println(c);
for (int i = 0; i < 6; i++) {
//假如要生成随机的小写字符:97~97+25
Random rnd = new Random();
int d = rnd.nextInt(26) + 97;
// System.out.println(d);
char c = (char) d;
System.out.print(c);
}
}
}