Polymorphism and Interfaces in Java (can polymorphism be used to implement interfaces…why?)

后端 未结 8 1923
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 17:14

In the real world what do people use this for (to solve what types of problems)? Can I see some example code of these working together? All I can find is code about cats and

8条回答
  •  有刺的猬
    2020-12-05 17:29

    Have a look at the code for Map/AbstractMap/HashMap as an example. You will find thousands of other examples in the JDK source which comes with the JDK (in src.zip)

提交回复
热议问题