Substitution Principle: a variable of a given type may be assigned a value of any subtype of that type, and a method with a parameter of a given type may be invoked with an argument of any subtype of that type.

 
  • 大概的意思是说某种类型的变量可以被该类型的任何子类所赋值,一个方法中的参数也可以被该参数的任何子类进行调用。
今日热词
目录 附录 查词历史