I'm working on an assignment where I have to sort integers and string type variables.
So I have a method declared as
public void quickSort(ArrayList<Entry<Integer, String>> list) {
but if I want to overload the method and use
public void quickSort(ArrayList<Entry<String, Integer>> list) {
It is recognized as a duplicate.
Is there a way to check what my variable types are? Alternatively, is there a way to sort strings and integers the same way so that I can do something like
public void quickSort(ArrayList<Entry<K, V>> list) {
that will work on both date types?