Question: what is the difference between inheritance and polymorphism in java?
Answer: Inheritance refers to using the structure and behavior of a super class in a subclass. Polymorphism refers to changing the behavior of a super class in the subclass. Polymorphism: The ability to treat objects of different types in a similar manner.