Here you can find the source of get_a_random_testData(ArrayList
Parameter | Description |
---|---|
mTestData | a parameter |
public static String get_a_random_testData(ArrayList<String> mTestData)
//package com.java2s; import java.util.ArrayList; import java.util.Random; public class Main { /**/*from w ww. j a v a 2 s . co m*/ * @param mTestData * @return */ public static String get_a_random_testData(ArrayList<String> mTestData) { return random(mTestData); } public static String random(ArrayList<String> randomValue) { Random rd = new Random(); int randomInt = rd.nextInt(randomValue.size()); return randomValue.get(randomInt); } }