I have 4 Strings to represent people and 4 Strings to represent names.
I’m trying to randomize them so that every time I start my application, my four people will have different names, but no one can have the same name during runtime.
Example:
String person_one;
String person_two;
String person_three;
String person_four;
String name_one = "Bob";
String name_two = "Jane";
String name_three = "Tim";
String name_four = "Sara";
Hope this makes some sense.
You can use Collections.shuffle():