import java.util.Random;
public class RandomTest
{
public static void main(String[] args)
{
Random rand = new Random();
for(int i=0;i<10;i++)
{
float pick = rand.nextFloat(); // random between 0.0 to 1.0
System.out.println(pick);
}
}
Random rand = new Random();
}
////////////////////////////////////////////////////////////
import java.util.Random;
public class RandomTest
{
public static void main(String[] args)
{
Random rand = new Random(20071969);
for(int i=0;i<10;i++)
{
int pick = rand.nextInt(10);
}
Random rand = new Random();
}
public class RandomTest
{
public static void main(String[] args)
{
Random rand = new Random(20071969);
for(int i=0;i<10;i++)
{
int pick = rand.nextInt(10);
System.out.println(pick);
} }
Random rand = new Random();
}
No comments:
Post a Comment