What restrictions are placed on method overloading and
method overriding?
Answer Posted / muthusenthil
Restriction imposed on Method Overloading are
a) should done with in a same class.
b) it should have same name of overloading method.
c) its arguments or parameter should be different
irrespective of return type.
Restriction imposed on Method Overriding are
a) should done with its derived class
b) should have same name of parent method and arguments
too.
Is This Answer Correct ? | 34 Yes | 7 No |
Post New Answer View All Answers
What value is a variable of the string type automatically initialized?
What is comparator in java?
If a method is declared as protected, where may the method be accessed in java programming?
What is the difference between abstraction and encapsulation?
What all access modifiers are allowed for top class ?
Can we write a class without main method in java?
What is the advantage of OOP in java?
What is collection class in java? List down its methods and interfaces.
Which class is the superclass of all classes?
Can a class be declared as static?
Explain parallel processing in java8?
describe method overloading
In how many ways we can do synchronization in java?
why java does not support unsigned keyword?
What is parameter example?