Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Koila Malik   on Dec 09 In Java Category.

  
Question Answered By: Keith Marshall   on Dec 09

public class Test{
public static void main( String args[] ){
java.util.HashSet whatever = new java.util.HashSet();
while(whatever.size() < 100) whatever.add(new Integer
((int)java.lang.Math.round(150 * java.lang.Math.random())));
}
}

Share: