Android List Random random(ArrayList randomValue)

Here you can find the source of random(ArrayList randomValue)

Description

random

Declaration

public static String random(ArrayList<String> randomValue) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;

import java.util.Random;

public class Main {
    public static String random(ArrayList<String> randomValue) {
        Random rd = new Random();
        int randomInt = rd.nextInt(randomValue.size());
        return randomValue.get(randomInt);
    }//w  w w . j a  v a 2 s .c om
}