Java ThreadLocalRandom randomString(List strings)

Here you can find the source of randomString(List strings)

Description

random String

License

Open Source License

Declaration

public static String randomString(List<String> strings) 

Method Source Code

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

import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static String randomString(List<String> strings) {
        return strings.get(ThreadLocalRandom.current().nextInt(strings.size()));
    }/*from   ww  w. ja va2  s  .  c  om*/
}

Related

  1. randomReal(float range)
  2. randomSeed()
  3. randomString()
  4. RandomString(int length)
  5. randomString(int minLength, int maxLength)
  6. randomStringArray(int arrayLength, int stringLength)
  7. randomWorld()
  8. randomWorld()
  9. shuffle(final T[] array)