ArrayList<ShipDetail> detailArray = new ArrayList<ShipDetail>(Arrays.asList(shipDetail));
Sorter.QuickSort( detailArray );
And this is my Sorter class in which I was trying to do Implement some algorithms.
public class Sorter
{
public static<T extends Comparable<T>> void QuickSort(AbstractList<T> collection )
{
quickSort(collection,0,collection.size()-1);
}
}
But while compiling i am getting the following error :
required: AbstractList found: ArrayList reason: inference variable T has incompatible bounds equality constraints: ShipDetail upper bounds: Comparable where T is a type-variable: T extends Comparable declared in method QuickSort(AbstractList)