what is overloading and overriding with example?

Answer Posted / rajesh r

OVERLOADING MEANS SAME METHOD NAME WITH DIFFERENT
PARAMETERS.
BOTH SHOULD BE DEFINED IN SAME CLASS ITSELF.

OVERRIDING MEANS SAME METHOD NAME WITH SAME PARAMETERS.THIS
CAN ASSOCIATED IN A CLASS AND ITS SUBCLASS.(VIRTUAL,
OVERRIDE)

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is valid keyword in java?

769


How can we achieve thread safety in java?

917


What is object class in java?

690


Can a constructor be private and how are this() and super() method used with constructor?

754


Why do we need singleton?

754


What is the use of :: in java?

794


Is upper case in java?

747


What are latest features introduced with java 8?

831


What are the special characters?

756


What do you mean by multithreaded program?

776


What is the difference between math floor and math round?

741


Is minecraft java edition free?

871


What is main string [] args?

748


How do you write methodology?

759


What is singleton class in ruby?

805