Android ArrayList Random get_a_random_testData(ArrayList mTestData)

Here you can find the source of get_a_random_testData(ArrayList mTestData)

Description

gerandotest Data

Parameter

Parameter Description
mTestData a parameter

Declaration

public static String get_a_random_testData(ArrayList<String> mTestData) 

Method Source Code

//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);
    }
}

Related

  1. permute(Random random, ArrayList array)