So far I have the following, as I am slowly learning Java. I am building a very simple utility that will let me (eventually) enter names in the console and shuffle those names pairing them up. As of now all this does is shuffle the array of names. I want to be able to slice or limit (return) 2 names at a time, this would remove them from the array (or didn't have to) then return the next two. and so on.
package com.company;
import java.util.Arrays;
import java.util.Collections;
public class Main {
public static void main(String[] args) {
// eventually have user type names instead as the number of names will change
String[] names = new String[] {"Jack", "Jill", "James", "Jose", "Jason", "Self"};
Collections.shuffle(Arrays.asList(names));
System.out.println(Arrays.asList("names));
}
}