Why is it not legal to have the following two methods in the same class?
class Test{ void add(Set ii){} void add(Set ss){}
Define a single Method without type like void add(Set ii){}
void add(Set ii){}
You can mention the type while calling the method based on your choice. It will work for any type of set.