Q:

I'm just stuck on getting a random string in an array

I'm just stuck on getting a random strings in an array.  
I have this so far: 
import java.util. Random; 

public class FootyDraw { 

        public static void main(String[] args) { 

                Random r = new Random(); 
                String[] teams = {"Arsenal", "Chelsea", "Man United", "Liverpool"}; //array         initializer 
                String draw = teams[r.nextInt(teams.length)];
          }
}

Does anyone know how I can get each string item in my array to print out once without repeating? 
(For instance I want to get for instance Liverpool v Man u and then Chelsea v Arsenal). 

A:

List<String> shuffled = Arrays.asList(teams);
Collections.shuffle(shuffled);

A:

You can shuffle the array, then print each element in the new order:
public class FootyDraw { 

        public static void main(String[] args) { 

                String[] teams = {"Arsenal", "Chelsea", "Man United", "Liverpool"}; //array         initializer 
                List<String> list =  Arrays.asList(teams);
                Collections.shuffle(list);
                for (int i = 0; i < teams.length; i += 2) {
                    if(i + 1 < teams.length) System.out.println(teams[i] + " v " + teams[i + 1]);
                }
          }
}

A:

How about something like this
public static void main(String[] args) {
    String[] teams = { "Arsenal", "Chelsea", "Man United", "Liverpool" }; // array
                                                                            // initializer
    java.util. List<String> al = new java.util. ArrayList<String>();
    for (String team : teams) {
        al.add(team);
    }
    java.util. Collections.shuffle(al);
    System.out.println(al);
}

