package com.cz.test;

import java.util.Random;

public class RandomTest {

public static void main(String[] args) {
//输出97-122之间的字符
//for(int i=0;i<6;i++){
//int s=(int) (Math.random()*26+97);
//System.out.println((char)s);
//System.out.println(s);
//}

//random类使用
Random random=new Random();
int a=random.nextInt(10);
System.out.println(a);
}
}

05-11 13:31