Is programming against interfaces in Java the same concept as using header files in C/C++?

前端 未结 7 1358
失恋的感觉
失恋的感觉 2021-02-07 08:02

The java code I\'m working on at the moment has often a structure like

file Controller.java:

interface Controller {...}

file Controller

相关标签:
7条回答
  • 2021-02-07 09:02

    Interfaces doesn't come from a desire to keep header files.

    Interfaces the closest Java comes to supporting http://en.wikipedia.org/wiki/Design_by_contract

    0 讨论(0)
提交回复
热议问题