Java Random randomNick()

Here you can find the source of randomNick()

Description

random Nick

License

Open Source License

Declaration

public static String randomNick() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String randomNick() {
        return "MC" + randomInt(1000, 9999);
    }/*from w w w. j  ava2 s .com*/

    public static int randomInt(int min, int max) {
        return min + (int) (Math.random() * ((max - min) + 1));
    }
}

Related

  1. randomKey()
  2. randomLetter()
  3. randomList(Collection collection)
  4. randomMember(Collection collection)
  5. randomNanoTime()
  6. randomPassword()
  7. randomPermutation(int size)
  8. randomPermutations(int[] tab, Random r)
  9. randomPermute(List l, Random rand)