package test; import java.util.Random; public class RandomNumberBetweenRange { public static void main(String args[]) { Random random = new Random(); int range = 10; System.out.println("Random numbers between 0 and " + range + " are : "); for (int i = 0; i < 15; i++) { System.out.println(random.nextInt(range)); } } }
Saturday, May 18, 2013
Generate random number between range
Tags
# Core Java
About Unknown
Kumar Bhatia is a technical resource working with Accenture and owns this blog on Java.
Core Java
Labels:
Core Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment