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
Can we extend singleton class?
Can we define constructor in inner class?
What is gc()?
How many types of array are there?
Can we increase size of array?
What restrictions are placed on method overriding in java programming?
Can you declare the main method as final?
What is use of static method?
How many classes can any class inherit java?
What is the ==?
What are keywords in programming?
What does a boolean method return?
Is stringwriter thread safe?
Can we use both this () and super () in a constructor?
What is procedure writing?