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
Does garbage collection occur in permanent generation space in jvm?
Why we do exception handling in java and how many types of exceptions are there?
What is meant by call by reference?
What is the size of boolean variable?
What is difference between c++ and java ?
What state does a thread enter when it terminates its processing in java programming?
how to write a server program and sending the mails to the server using smtp protocol please help me
What is string made of?
What is the internal implementation of set in java?
What are the characteristics of Final,Finally and Finalize keywords.
What are the loops in java?
Can you call one constructor from another if a class has multiple constructors?
What is default constructors?
What are the drawbacks for singleton class?
What's the default access specifier for variables and methods of a class?