I'm trying to learn java. When i'm running the code in DrJava i get this message: cannot find symbol. I tried several things but nothing works. When i'm searching the internet I get most of the times the problem is 'import java.util.Random;', but I wrote that down. Anyone knows what the problem is? Thanks a lot!
import java.util.Random;
public class dobbelsteen {
public static void main(String[]args) {
int dobb1;
int dobb2;
int dobb3;
int dobb4;
int dobb5;
boolean alldobb = true;
do {
dobb1 = random.nextInt(6) + 1;
dobb2 = random.nextInt(6) + 1;
dobb3 = random.nextInt(6) + 1;
dobb4 = random.nextInt(6) + 1;
dobb5 = random.nextInt(6) + 1;
if (dobb1 != dobb2 && dobb2 != dobb3 && dobb3 != dobb4 && dobb4 != dobb5) {
System.out.println(dobb1 + dobb2 + dobb3 + dobb4 + dobb5);
}
else {
System.out.println(dobb1 + dobb2 + dobb3 + dobb4 + dobb5);
alldobb = false;
}
}while(alldobb);
}
}