阅读背景:

为什么界面中定义了私有成员/方法?

来源:互联网 

I've always been confused by the fact that most OOP languages (or rather, C++) make you define private methods/members in the interface (by interface I mean the class declaration - seems like I was confused). Isn't this showing the implementation details of the class and going against the idea of encapsulation? I've always been confused by the fact that most




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: