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 application system?

505


Can private class be inherited in java?

552


If a method is declared as protected, where may the method be accessed in java programming?

498


How do you check if two given string are anagrams?

554


What are the different types of inner classes?

536






I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com

1079


What are loops in java? What are three types of loops?

551


What are the five major types of reference sources?

543


What is the current version of java?

545


What are the advantages of exception handling?

556


What is the difference between the font and fontmetrics classes in java programming?

506


What are three ways in which a thread can enter the waiting state in java programming?

686


What is void class in java?

528


Difference between ‘>>’ and ‘>>>’ operators in java?

642


What are use cases?

561