+1 vote
in JAVA by

What is the relationship between inheritance and polymorphism in Java?

1 Answer

0 votes
by

Inheritance and polymorphism are closely related in Java. Inheritance provides a way to create a new class based on an existing class, and polymorphism provides a way to write code that can work with objects of different classes that share a common interface.

Related questions

0 votes
asked Feb 9, 2021 in JAVA by SakshiSharma
0 votes
asked Feb 8, 2021 in JAVA by SakshiSharma
...