How do you use Math.random to generate random ints?
My code is:
int abc= (Math.random()*100); System.out.println(abc);
All it print
For your code to compile you need to cast the result to an int.
int abc = (int) (Math.random() * 100);
However, if you instead use the java.util.Random class it has built in method for you
Random random = new Random(); int abc = random.nextInt(100);