为什么 ArrayList 父类中已经实现了 List 接口,自身也实现了 List 接口

Java About 392 words

引用

I've asked Josh Bloch, and he informs me that it was a mistake. He used to think, long ago, that there was some value in it, but he since "saw the light". Clearly JDK maintainers haven't considered this to be worth backing out later.

翻译

集合框架的编写者Josh Bloch说这是一个错误。JDK维护者不认为这值得回退代码。

出处

https://stackoverflow.com/questions/2165204/why-does-linkedhashsete-extend-hashsete-and-implement-sete

Views: 1,380 · Posted: 2021-12-03

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Today On History
Browsing Refresh