package org.xiaowu.random.demo;
import java.util.Random;
import org.junit.Test;
公共类随机demo {
@Test
公共void demo () {
Random rnd=new Random (;
intcode=rnd.nextint(8999 ) 1000;
}
@Test
公共void demo1(
Random r=new Random (;
int nextInt=r.nextInt (;
RandomR1=newRandom(10;
int nextInt2=r1.nextInt (;
}
//*
@Test
公共void demo2() {
Random r=new Random (;
double d1=r.nextDouble (;
}
//*
@Test
公共void demo3() {
Random r=new Random (;
doubleD2=r.nextdouble(*5;
}
//*
@Test
公共void demo4() {
Random r=new Random (;
doubleD3=r.nextdouble(*1.51;
}
//*
@Test
公共void demo5() {
Random r=new Random (;
int n1=r.nextInt (;
}
//*
@Test
公共void demo6() {
Random r=new Random (;
intN2=r.nextint(10;
intN3=math.ABS(r.nextint( () );
}
//*
@Test
公共void demo7() {
Random r=new Random (;
intN3=r.nextint(11;
intN4=math.ABS(r.nextint( () );
}
//*
@Test
公共语音演示8 () {
Random r=new Random (;
intN4=r.nextint(18 )- 3;
intN5=math.ABS(r.nextint( ()- 3;
}
}