What will be the return type of the below overloaded methodpublic void example(int x) {a) int b) charc) short

This question is related to Oracle Interview

Showing Answers 1 - 4 of 4 Answers

Manoj Kumar

  • Aug 28th, 2006
 

Overloaded methods does not concern with the return type , there is signature of the methods should be different

Sunil

  • Sep 25th, 2006
 

One can overload the methods, only by 1. Change in number of arguments.2. Change in type of arguments.And NOT on return type. Hence in the above case, you cannot overload "example(int x)" method by changing its return type

shaik

  • Jan 5th, 2007
 

Overloading never concerns with return type. Even if the method "void example(int x)" is overloaded with different  parameters and  no. of parameters the return type is same i.e void mean nothing it is returning.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions