Answers

Question and Answer:

  Home  Integration Programmer

⟩ Explain Liskov substitution principle?

Liskov substitution principle is one of the five principle introduced by Uncle Bob as SOLID design principles. It's the 'L' in SOLID. Liskov substitution principle asserts that every sub type should be able to work as proxy for parent type. For example, if a method except object of Parent class then it should work as expected if you pass an object of Child class. Any class which cannot stand in place of its parent violate LSP or Liskov substitution principle. This is actually a tough question to answer and if you does that you end up with creating a good impression on interviewers mind.

 159 views

More Questions for you: