What will happen,if we compile below function:-

private double sum(int a, int b)

private int sum(int i, int j)

Note:- In above function return type is different.
1st function return type is double and,
2nd function return type is int

 Posted by vishalneeraj-24503 on 11/29/2013 | Category: OOPS Interview questions | Views: 4314 | Points: 40

It will throw an error saying that:-

"Type '_Default' already defines a member called 'sum' with the same parameter types"

Here _Default is a page name.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response