Java Random Number generateRandomnumber(int firstNum, int restNum)

Here you can find the source of generateRandomnumber(int firstNum, int restNum)

Description

generate Randomnumber

License

Apache License

Declaration

public static String generateRandomnumber(int firstNum, int restNum) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Random;

public class Main {
    public static String generateRandomnumber(int firstNum, int restNum) {
        Random random = new Random(System.currentTimeMillis());
        String first = String.valueOf(random.nextInt(firstNum));
        String rest = String.valueOf(random.nextInt(restNum));
        return first + rest;
    }/*from w  ww  .j  a  v a  2  s  .  co m*/
}

Related

  1. distinctInts(int from, int to, int number)
  2. generateRandomNum(int i)
  3. generateRandomNum(int passNumber)
  4. generateRandomNumb(int randomSize, int range)
  5. generateRandomNumber()
  6. generateRandomNumber(int from, int to)
  7. generateRandomNumber(int length)
  8. generateRandomNumber(int min, int max)
  9. generateRandomNumber(int min, int max)