package javaapplication1;
import java.util.Random;
public class Example {
public static void main(String[] args) {
Random rnd = new Random();
for (int i = 0; i < 100; i++) {
if (i == rnd.nextInt(100))
break;
System.out.println(i);
}
}
}
/*
run:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
*/