private static void randomNumber() {
int rand;
int min = -10;
int max = 10;
System.out.println(" ");
for (int i = 0; i < 10; i++) {
rand = (int) (Math.random() * (max - min + 1) ) + min;
System.out.print(" " + rand);
}
System.out.println("\n");
}
can anyone explain to me line 10: rand = (int) (Math.random() * (max - min + 1) ) + min;
Thank you!