RandomStringUtils: randomNumeric(int count) : RandomStringUtils « org.apache.commons.lang « Java by API






RandomStringUtils: randomNumeric(int count)

/*
6) The two digit lucky number for the day is >>>17
 */
import org.apache.commons.lang.RandomStringUtils;

public class RandomStringUtilsTrial {
    public static void main(String[] args) {

      // Begin Lottery code
      System.out.print("6) The two digit lucky number for the day is >>>");
      System.out.println(RandomStringUtils.randomNumeric(2));
      // End Lottery code

    }
}

           
       








Apache-Common-Lang.zip( 248 k)

Related examples in the same category

1.RandomStringUtils: random(int count, String chars)
2.RandomStringUtils: random(int count, boolean letters, boolean numbers)
3.RandomStringUtils: random(int count, int start, int end, boolean letters, boolean numbers, char[] chars, Random random)
4.RandomStringUtils: randomAlphabetic(int count)