A good answer might be:

The signature of a method is the name of the method and its parameter list, something like this:

someMethod( int, double, String )
The return type is not part of the signature. The names of the parameters do not matter, just their types.

Signature

The name of a method is not enough to uniquely identify it, since several classes in a hierarchy might use the same name. Using the types in the parameter list says more carefully which method you want. The return type can't be used because of the following situation: Say that there are two someMethod() methods: one defined in a parent class like this:

int someMethod( x int, y double, z String )
{
  //method body
}

and another method defined in a child class like this:

short someMethod( a int, b double, c String )
{
  // completely different method body
}

Somewhere else in the program there is an invocation of someMethod():

double w = child.someMethod( 12, 34.9, "Which one?" );
The value on the left of the = can be either int or short, since both can be converted to a double value needed for the double variable w. So the statement gives the compiler no information about the type of value returned by someMethod.

Of course the names of the parameters in the two definitions of someMethod() can't be used to decide which one to use because the invocation uses actual values like 12 and 34.9.

So the two definitions of someMethod() have the same signature; they are not different enough to be told apart. Because of this, the method defined in the child will override the method defined in the parent. The invocation will cause the child's method to run.

QUESTION 2:

Do these two methods have different signatures:

double aMethod( x int, y String )
{
}


short aMethod( a int, b double )
{
}

Click Here after you have answered the question