Originally posted by marc weber: The argument lists are different, so this should be fine. It works when I compile it. What error message are you getting?
Must not be adding to what he already has then. In total he has:
The first two are identical because Socket is a subtype of Object.
You could change the order of the parameters. You could use Object rather than Socket and simply check for a Socket via instanceof to delegate the functionality depending on type. You could remove the first two methods and have the third allow null for either the Socket or the Object and depending on which is null do what you would have done in the others. This kind of problem arising usually indicates a larger flaw in the design to me.