Here you can find the source of generateRandomnumber(int firstNum, int restNum)
public static String generateRandomnumber(int firstNum, int restNum)
//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*/ }