1.Method overloading means?
Multiple methods with same name same arguments
Multiple methods with same name different arguments
Multiple methods with different name different arguments
Wrong
Correct
Defining multiple methods with same name and with different arguments is known as method overloading
2.Method overloading also known as?
Dynamic polymorphism
Static polymorphism
Wrong
Correct
Defining multiple methods with same name and with different arguments is known as method overloading
3.Can we overload main method?
Yes
No
Wrong
Correct
We can overload main method public static void main Strung []args only will be called by jvm. other methods needs to call explicitly by programmer. Means they acts as normal methods
4.Which is incorrect statement regarding overloading?
(which is incorrect about method overloading)
(which is incorrect about method overloading)
Method with same name and differ in number of arguments
Methods should be with same name and different return type
Methods should be same name and differ in order of type of arguments
Methods should be with same name and differ in type of arguments
Wrong
Correct
Return type is not considered in overloading. we can define two methods with same return type also a.
No comments