package com.huangtao.random;
import java.util.Random;
public class Acheive {
/**
* 声明被调用了
*/
public void init(){
System.out.println("Acheive.java实现类被调用随机数开始....");
}
/**
* 产生随机数0---10
*/
public int randoms(){
Random random = new Random();
int i=random.nextInt(10);
return i;
}
/**
* 产生随机数0---80
* @return
*/
public int randomone(){
Random random = new Random();
int i=random.nextInt(80);
return i;
}
/**
* 产生随机数80---100
* @return
*/
public int randomtwo(){
Random random = new Random();
int i=random.nextInt(20);
int j=80;
return i+j;
}
}