how two interface use two method [closed]

The signature of the method defines which one will be invoked.

The signature of your 2 show methods are different. The first does not take any argument, the second takes an int argument.

As the argument is to be provided when invoking the method, the method to invoke has been defined.

Leave a Comment