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
If goto and const is reserve words than why it is not work in java?
What is a functional interface?
What kind of variables can a class consist?
Can static methods access instance variables in java?
What are the different types of multitasking?
Does java support function overloading, pointers, structures, unions or linked lists?
What is namespace in java?
Explain about procedural programming language or structured programming language and its features?
What is replaceall in java?
Tell me how many ways are there to initialise an integer with a constant.
How do you define a variable?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What are voids?
Is math an abstract class in java?
Why are the objects immutable in java?