Home » JAVA Programming » Java Basic » Question
  1. What does Liskov substitution principle specify?
    1. child class can be substituted by parent class
    2. parent class can be substituted by child class
    3. No classes can be replaced by each other
    4. parent class cannot be substituted by child class
    5. 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.



Your comments will be displayed only after manual approval.