...
This compliant solution uses a single display method and instanceof to distincguish distinguish between different types. The output is Set invoked, ArrayList invoked, Set invoked which is expected. Do not create ambiguity while using overloading so that the code is clean and easy to understand.
...