import java.util.*;
class RandomDemo1
{
public static void main(String...args)
{
//Random object created.
Random rn=new Random();
//Random method called for integer values.
int num=rn.nextInt();
//show the Random number.
System.out.println("Random number is : "+num);
}
}
Output:
No comments:
Post a Comment