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 boolean example?

728


How many types of threads are there in java?

741


What is the private method modifier?

799


What is the use of join method?

788


What is difference between throw and throws ?

852


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

782


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

2197


Tell me the latest versions in java related areas?

821


What is keyword and identifier?

860


What is the difference between import java.util.date and java .util?

804


Can we call the constructor of a class more than once for an object?

824


Can we store variables in local blocks?

1037


Is integer a class?

780


What is a short in java?

693


what is the purpose of using rmisecuritymanager in rmi?

753