I have an ArrayList
of something. I don't now correctly, but I'm pretty sure, that the Object
has the compareTo(Object)
, which returns int
in any cases. So, if I want to implement a sort(ArrayList)
, Objects may by strings, or integers.
private static void sort(ArrayList<String/Integers, or SomethingElse, not sure now> list)
I tried to search something like multi raw type, but I didn't find anything.
How should I do it?