I need to split an array into thirds, and the only effective way I can think of is using the copyOfRange method. Is there a way for me to return all three arrays because I can't seem to do so? If not, what is the best way to divide one array three ways?
public char[] board(char[] a) {
char[] b = Arrays.copyOfRange(a, 0, a.length / 3);
char[] c = Arrays.copyOfRange(a, a.length / 3, a.length - 3);
char[] d = Arrays.copyOfRange(a, a.length - 3, a.length);
return null;
}