Polymorphism

Advertisements
Advertisements
Advertisements3
Advertisements4
Advertisements6
Advertisements66

1. What are the two main mechanisms of polymorphism in Java?

Ans. Method Overloading and Method Overriding.

2. What is method overloading in Java?

Ans. A way to provide different implementations of the same method for different types of input.

3. What is method overriding in Java?

Ans. A way to provide new implementation for a method that is already defined in a super class.

 
 
 

Author: Lakshmi Prasanna Ponnala

Completed M.Tech in Digital Electronics and Communication Systems.

Leave a Reply

error: Content is protected !!

Discover more from ece4uplp

Subscribe now to keep reading and get access to the full archive.

Continue reading