JAVAAAAAAA help me write this method!!!!!! /** * This randomly selects, with the
ID: 3920764 • Letter: J
Question
JAVAAAAAAA help me write this method!!!!!!
/**
* This randomly selects, with the Random number generator passed as a parameter,
* one of elements (array of int) in the neighbors list. If the size of neighbors is 0 (empty)
* then null is returned. If neighbors contains 1 element then that element is returned. The
* randGen parameter is only used to select 1 element from a neighbors list containing
* more than 1 element. If neighbors or randGen is null then an error message is
* printed to System.err and null is returned.
*
* @param neighbors A list of potential neighbors to choose from.
* @param randGen The random number generator used throughout the simulation.
* @return A int[] containing the coordinates of a creatures move or null as specified above.
*/
public static int[] chooseMove(ArrayList<int[]> neighbors, Random randGen) {
//TODO Milestone 2
return null; //change in Milestone 2
}