摘要: abstract class 和 interface 區別開來還是容易的。只要弄清楚描述對象本質和抽象概念的關系就好區分了。當描述對象本質和抽象概念是"is-a"關系時使用abstract來抽象描述對象;當描述對象本質和抽象概念是"like-a"關系時使用interface來抽象該對象。
閱讀全文
閱讀全文
yeafee@夜飛郎it's usually better to solve problems with simplicity and finesse rather than muscle. |