I have 2 methods.
public static <T extends Comparable<T>> T[] sort(T[] array) {}
And
public static <T extends Comparable<T>> T[] sort(T[] array,
Comparator<? super T> c) {}
Implemantation w/o any erros, but after JUnit test case i got an error on T[] s =...
JUnit says:
java.lang.object cannot be cast to java.lang.Comparable;
In the test case JUnit gives me also this line next to the error:
assertArrayEquals(a1, ComparisonCountingSort.sort(ar1));
My question here is to know what i can fix here to have an succesful JUnit test case.