What restrictions are placed on method overloading and
method overriding?

Answer Posted / aditya mohata

in method overloading we hav to hav the methods in the same
class n they hav to hav diff signatures so as to avoid
ambiguity.they hav to hav the same method name.

in method overriding we hav to hav the same name of the
methods n hav to hav them in different classes with same
signatures.

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an iterator java?

535


Which one of the following suits the description of a string better: derived or primitive?

515


What is user defined exception in Java?

617


what is a thread pool in java and why is it used?

538


How are this() and super() used with constructors in java programming?

578






Why should I use abstract class?

576


What is method reference?

523


What is sorting algorithm in java?

531


When is an object subject to garbage collection?

593


What is the size of int?

605


Why do we declare a class static?

555


What is byte [] in java?

544


What is charat java?

548


Why we used vector class?

636


Write a program to solve producer consumer problem in java?

571