-
What does Liskov substitution principle specify?
-
- child class can be substituted by parent class
- parent class can be substituted by child class
- No classes can be replaced by each other
- parent class cannot be substituted by child class
- None of these
Correct Option: B
Liskov substitution principle states that Objects in a program should be replaceable with instances of their sub types without altering the correctness of that program.