Hi,
I'm having trouble with the following simple test program to extract 10 random numbers from 0 to 5.
import java.util.*;
public class TestRandom {
public static void main(String[] args) {
Random rand = new Random();
for (int i = 0; i < 10; i++) {
int j = rand.nextInt(5);
System.out.println(j);
}
}
}
Compiler says: cannot find method nextInt(int);
Sorry, but I can't really see the mistake. Any help is appreciated.