lundi 13 juillet 2015

cannot find symbol class Random

When I run this code it technically shouldn't have any problem but I keep getting the error "cannot find symbol Random" Is there anything I need to input in the beginning of the code!?

public class RandomNumbers {

    public static void main(String[] args) {
        Random r = new Random();
        System.out.println("First number: " + r.nextInt(100));
        System.out.println("Second number: " + r.nextInt(100));
        System.out.println("Third number: " + r.nextInt(100));
        System.out.println("Fourth number: " + r.nextInt(100));
        System.out.println("Fifth number: " + r.nextInt(100));
    }
}




Aucun commentaire:

Enregistrer un commentaire