DEV Community

Ratik Mahajan
Ratik Mahajan

Posted on

Java Oops Interview Question

what is compile time and run time polymorphism
Answer: compile time polymorphism is done at the compile time. example of the compile time polymorphism is method overloading and example of the run time polymorphism is method overriding.

what is inheritance in java.
inheriting the methods and properties from the parent class into base class is known as inheritance. extends keyword is used to inherit the state and behavior.

Top comments (0)