What is the difference between overloading and overriding a
function?

Answer Posted / ghanshyam dobariya

OVERLOADING: Declaration and definition are in the same
class i.e. a class in which they are defined.

OVERRIDING:Declaration is done at super class while actual
definition is define in sub class.

OVERLOADING: Any code mistake we make in defining it's code
, detected at compile time

OVERRIDING: Any code mistake we make in defining it's code
,detected at run time.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name some classes present in java.util.regex package.

693


What does jenkins do?

569


How do you convert bytes to character in java?

621


How many bits is a boolean?

701


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

669






What is locale?

693


Can a singleton class be inherited?

616


What is comparable and comparator interface? List their differences

683


What is the symbol for average?

605


What will happen if static modifier is removed from the signature of the main method?

608


What is reverse function?

668


What is the purpose of static methods and static variables?

640


What is the static keyword?

670


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

710


What is the use of a conditional inclusion statement in Java ?

681