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

What does escaping a character mean?

532


How many bits is a char?

535


This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }

563


Can a final method be overloaded?

510


What is thread synchronization in java?

484






What is javac_g?

590


What is collection api?

610


What is io stream in java?

519


How can we pass argument to a function by reference instead of pass by value?

588


What is t in parametric equations?

547


What are the legal parameters?

511


Write a method that will remove given character from the string?

575


What is a databasemetadata?

551


What type of value does sizeof return?

543


Can we have a try block without catch block?

569