Java Random Number getDocumentNumber()

Here you can find the source of getDocumentNumber()

Description

get Document Number

License

Open Source License

Declaration

public static String getDocumentNumber() 

Method Source Code

//package com.java2s;
/*//from w ww  .j  ava 2  s .  c o  m
 * All GTAS code is Copyright 2016, Unisys Corporation.
 * 
 * Please see LICENSE.txt for details.
 */

import java.util.Random;

public class Main {
    private static String[] alphas = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N" };

    public static String getDocumentNumber() {
        Random random = new Random();
        int select = random.nextInt(99) * 1234;
        int select2 = random.nextInt(alphas.length);
        return alphas[select2] + "0" + select;
    }
}

Related

  1. genRandomNumber(int digitNumber)
  2. genRandomNumber(int minNumber, int maxNumber, int digits)
  3. genRandomNumberString(int numberCount)
  4. genRandomNumList(int num, int count)
  5. getChance(Number number)
  6. getFlightNumber()
  7. getNextRandomNumber()
  8. getNum(int length)
  9. getNumAndWord(int length)