The method invoked here will be the one which is most specific to the condition. So the one to be called here is:
showInputDialog(Component parent, Object message)
Determining which method is to be invoked, is based on the "Determine Method Signature" (15.12.2) step of overload resolution in the spec, and in particular "Choosing the Most Specific Method" (18.104.22.168).
According to this spec, "If more than one member method is both accessible and applicable to a method invocation, it is necessary to choose one to provide the descriptor for the run-time method dispatch. The Java programming language uses the rule that the most specific method is chosen." (read more...)