class RandomDemo
{
    public static void main(String args[])
    {
        for(int i=1; i<=5; i++)
        {
            System.out.println((int)(Math.random()*100));
        }
    }
}

 OUTPUT:

javac RandomDemo.java
 
java RandomDemo
49
96
95
35
24
 
java RandomDemo
42
66
92
43
62