package MyMath;
import java.util.Random;
//?????????  ??????????????
public class random {
public static void main(String args[])
{
Random random=new Random(5);
for(int i=0;i<10;i++)
{
System.out.println(random.nextInt());
}
}
}
????????java ??????????
???????????д?????????????????????????????????????????????????????????????????????????μ?
package MyMath;
public class random1 {
public static void main(String args[])
{
double []r=new double[2];
r[0]=5.0;
for(int i=0;i<10;i++)
{
System.out.println(rand1(r));
}
}
public static double rand1(double []r)
{
double temp1??temp2??temp3??p??base;
base=256.0;
int  a=17??b=139;
temp1=r[0]*17+139;
temp2=(int)(temp1/256);
temp3=temp1-temp2*base;
r[0]=temp3;
p=temp3/256;
return p;
//??????? ??   ?????  r[i]=mod(a*r[i-1]??base);  ????? p=r[i/base;
//???????? ?????????  ??????????????????? ??????  ?????????????????????
}
}