Is there a way to override a Java method that the only thing that changes is an ArrayList?
For example:
public void quickSortMethod(ArrayList<Integer> comparison, int start, int end)
{}
public void quickSortMethod(ArrayList<Double> comparison, int start, int end)
{}
This currently gives me the following error:
Method quickSortMethod(ArrayList<Integer>, int, int) has the same erasure quickSortMethod(ArrayList<E>, int, int) as another method in type QuickSort
Btw I’m using other objects I created as parameters in the ArrayLists
ArrayList<MyObject>...
Unfortunately, no. Because of type erasure after compilation there’s no difference between the two.