This blog is about providing theory as well as simple executable codes of different programming languages such as java, C, C++, and web programming, etc. This blog will be helpful to the IT students to learn about programming.

Showing posts with label overloading and overriding method with example. Show all posts
Showing posts with label overloading and overriding method with example. Show all posts

Thursday, March 9, 2023

Define polymorphism. Differentiate between overloading and overriding method with example.

March 09, 2023 0
 Polymorphism is a concept in object-oriented programming that allows objects of different classes to be treated as if they were objects of the same class. It allows a single method or operation to have different meanings or behaviors based on the context in which it is used.In Java, there are two types of polymorphism:Compile-time Polymorphism: This is achieved through method overloading, where two or more methods in a class have the same name but different...

Slider Widget