Given the following sample code:
public class Example5{
public float Twin(float a, float b) {...
}
public float Twin(float a1, float b1) { ...}
}
Is the method overloading correctly used(in the above code) ? Choose correct option :
1.Correct , method overloading is used
2.Correct ,method overriding is used.
3.Incorrect, same type of argument with exact number of arguments.
4.(1) &(2) both are correct.
(3)
Changing the parameter names is not sufficient to count as overloading.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.