1

Is there any built in function to shuffle contents of String array in java/android?

For example, To shuffle array a.

a[4]={"abc","cde","def","ghi"}
0

1 Answer 1

1

try Collections.shuffle() in java to shuffle the elements inside the array

Collections.shuffle( a);
for (String i : a) {
    System.out.println(i);
}
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.