Introduction 介绍

Don't worry, the Liskov Substitution Principle is a lot easier to understand than it sounds. This principle states that you should be able to use any implementation of an abstraction in any place that accepts that abstraction. But, let's make this a little simpler. In plain English, the principle states that if a class uses an implementation of an interface, it must be able to use any implementation of that interface without requiring any modifications.


Liskov Substitution Principle 里氏替换原则

This principle states that objects should be replaceable with instances of their sub-types without altering the correctness of that program.


results matching ""

    No results matching ""