Hello DaniWeb,
Basically like the title suggests I am having trouble generating a random element from my array, and storing it in another array. I am quite new to Java, and the api is a little confusing but from what I can see there is no method for this. Searching online has returned this snippet of code
String[] fruits = { "apple", "apricot","orange", "pear", "plum", "peach", "watermelon"};
String ret = pickRand.get(fruits);
System.out.println(ret);
although using the pickRand() function is throwing me up an error, even though I have imported java.until.Random.
Thank you for reading and any advice you throw my way.
- Static