Java Random Numbers
This simple Program will output Random Numbers using Java
Java
import java.util.*;
class RandomNumbers {
public static void main(String[] args) {
int counter;
Random nums = new Random();
System.out.println("Random Numbers:");
for (counter = 1; counter <= 5; counter++) {
System.out.println(nums.nextInt(100)); } } }
Comments
Post a Comment