Java Random Name getRandomName()

Here you can find the source of getRandomName()

Description

get Random Name

License

LGPL

Declaration

public static String getRandomName() 

Method Source Code


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

import java.util.Random;

public class Main {
    private static String[] firstParts = new String[] { "Gamer", "Pixel", "Derp", "Random", "That", "NoHaxJust",
            "Derp", "Fun", "Luigi" };
    private static String[] secondParts = new String[] { "01", "Boy", "Guy", "Mario", "Plain", "Simple",
            "NotHacking", "Random", "11", "06" };
    private static Random theRandom = new Random();

    public static String getRandomName() {
        return firstParts[theRandom.nextInt(firstParts.length - 1)]
                + secondParts[theRandom.nextInt(secondParts.length - 1)];
    }/*from  www. j  a  v  a 2s .c o  m*/
}

Related

  1. getRandomFileName()
  2. getRandomName()
  3. getRandomName()
  4. randomFilename()
  5. randomFileName()
  6. randomIndexName()