explain method overridding method overloding with examples?

Answer Posted / senthamil kumaran

polymorphism can be divided into two tyes:-

Dynamic polymorphism or Run time polymorphism
Static polymorphism or Compile time polymorphism

Example for Static polymorphism
Method Overloading

Example for Dynamic polymorphism

Method Overriding



overloading: same method name but different argument list
is called as overloading

overriding:-same methodis redefined in the following
Derived classes with the same arugument list

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the major differences between html tags and strut specific html tags?

517


What is struts in java with example?

510


Which configuration file is used for storing jsp configuration information in struts?

545


What is the purpose of @conversionerrorfieldvalidator annotation?

617


Explain the difference between jakarta struts and apache struts?

526






Do you need an alignment after replacing struts?

523


What is the difference between requestaware and servletrequestaware interface?

580


What is the purpose of @typeconversion annotation annotation?

559


What is the difference between filters and interceptors ?

501


Why we use struts in java?

516


How the exceptions are handled in struts?

534


How to override the default error message that can come during file uploading process?

576


What do struts do?

521


How can we display validation errors on jsp page?

539


What is the default location of result pages and how can we change it?

552