Java ThreadLocalRandom getLetter()

Here you can find the source of getLetter()

Description

get Letter

License

Open Source License

Declaration

private static String getLetter() 

Method Source Code

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

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    private static String letter = "";

    private static String getLetter() {
        String[] let = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
                "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
                "w", "x" + "y" + "z" };
        letter = let[ThreadLocalRandom.current().nextInt(let.length)];
        return letter;
    }/*from  ww  w .j  a  v  a  2  s  .c o  m*/
}

Related

  1. genRandomString()
  2. get_a_number_between_min_and_max(int min, int max)
  3. getBoolean()
  4. getElement(boolean[] array)
  5. getInt(int bound)
  6. getRandom()
  7. getRandom(int p)
  8. getRandom8()
  9. getRandomBetween(int min, int max)