Java Program For Random Numbers

import java.util.*;
 
class RandomNumbers {
  public static void main(String[] args) {
    int c;
    Random t = new Random();
 
    // random integers in [0, 100]
 
    for (c = 1; c <= 10; c++) {
      System.out.println(t.nextInt(100));
    }
  }
}
Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.

No comments:

Post a Comment