接口的重点是什么?

时间:2017-03-07 06:07:27

标签: java interface polymorphism

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

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

1 个答案:

答案 0 :(得分:0)

这个问题已在以下问题得到解答:

When should one use interfaces?

What is an interface in Java?

Java Interfaces?

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