I have a String named headline
, and it should be a random combination of three to five words from the following list: up, down, rise, fall, good, bad, success, failure, high, low.
I created a list such as:
List list= new ArrayList();
list.add("up");
list.add("down");
list.add("fail");
list.add("success");
list.add("good");
list.add("bad");
list.add("upper");
list.add("uber");
How would I get a random combination of three to five words from this list?