What is the difference between overloading and overriding a
function?

Answer Posted / ankit

IN overloading the function are used in same class, they
have different parameters each time we define the funtion,
and perform the same task.

overriding is used in diferent class with same parameters.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we catch more than one exception in single catch block?

595


Does java allow overriding static methods ?

622


Is java a compiler?

563


What does method mean?

506


What is the purpose of declaring a variable as final?

480






what is meant by Garbage collection?

616


Can we sort a map in java?

570


Is there any difference between nested classes and inner classes?

531


What is a nested structure?

527


What is linked hashset and its features?

541


Is integer passed by reference in java?

558


What is the size of integer?

579


How do you sort in ascending order in java?

514


What are the types of java?

598


Why is inheritance used in java?

595