1// Genereates a number between 0 to 1;
2Math.random();
3
4// to gerate a randome rounded number between 1 to 10;
5var theRandomNumber = Math.floor(Math.random() * 10) + 1;
1import java.util.Random;
2
3Random rand = new Random();
4int random_integer = rand.nextInt(upperbound-lowerbound) + lowerbound;