Answer: No,It does not depend on Return Type.Because if return type is different and function name as well as parameter is also same.
Then it will give compile time error.
Below example will give us clear picture:-
public void display(int id)
{
}
public int display(int id)
{
}
Once we compile above example then it will give compile-time error as
Type '_Default' already defines a member called 'display' with the same parameter types
Here _Default is a Page Name.
Asked In: Many Interviews |
Alert Moderator