I'm trying to randomly select an element from a 2-d array. I specifically only one element e.g. x1
public static void main(String[] args) {
Random rand = new Random();
String[][] couples = {{"x1","y1"},{"x2","y2"},{"x3","y3"},{"x4","y4"},{"x5","y5"}};
int rnd=rand.nextInt(couples.length);
System.out.println(couples[rnd]);
}
This is what I've got so far but it prints out: [Ljava.lang.String;@4517d9a3