The error I am getting is class expected? I want to be able to pass in an array of anything. I do not understand why it does not work.
public static <T extends Comparable<T>> T Max(T value[])
{
T max = value[0];
for(int x = 0; x < value[].length; x++) //here I get the error
{
if(value[x].compareTo(max) > 0)
max = value[x];
}
return max;
}
value.lengthnotvalue[].length