I'm attempting to create a method that will return an index within an array.
private static Integer[] day1 = new Integer[6];
public Integer[] getDay1(Integer team) {
return day1[team];
}
When I try to do this, however, it highlights the opening bracket following day1 with this error.
Days.java:32: error: incompatible types: Integer cannot be converted to Integer[]
return day1[team];
^
Any idea why this is? Any help would be appreciated