【问题标题】:What's the point of Interfaces? [duplicate]接口的意义何在? [复制]
【发布时间】:2017-03-07 06:07:27
【问题描述】:

我无法理解为什么我应该使用接口,以及我应该如何将它们集成到我当前的项目中。我已经使用了很多多态性,而且我经常在同行的其他项目中同时看到多态性和接口。

为什么要使用接口?真正的好处是什么?

【问题讨论】:

标签: java interface polymorphism


【解决方案1】:

这个问题已经回答了:

When should one use interfaces?

What is an interface in Java?

Java Interfaces?

要获取有关 OOP 设计的更多信息,您还可以参考 Head First: Object oriented analysis and design 等书籍。在CourseraEdx等平台上也有一些在线课程供您使用。

【讨论】:

  • 请不要发布重复链接作为新答案。将它们作为评论发布或投票以重复关闭问题。
猜你喜欢
  • 2010-10-23
  • 2016-03-01
  • 1970-01-01
  • 2011-03-15
  • 1970-01-01
  • 2014-01-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多