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 is a instance variable in java?
What is the epoch date?
How is hashset defined in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
Can we overload final method in java?
What is close method? How it's different from Finalize & Dispose?
How many types of equations are there?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
Explain the difference between abstraction and encapsulation.
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
What is final?
Implement a stack with push (), pop() and min() in O(1) time.
Explain the selection sort algorithm and state its time complexity?
Why isn’t there operator overloading?
What are decalarations?