collection - 为什么Java集合框架要用内部类迭代器的设计来实现读取操作?
ringa_lee
ringa_lee 2017-04-18 10:43:42
0
1
888
ringa_lee
ringa_lee

ringa_lee

reply all(1)
Ty80

First statement:

  • Map does not implement the Collection interface

  • Collection means that this is a collection, that is, the interface of the collection is defined

  • Iterator is the interface for traversing collections

Answer:

To reduce coupling. Iterator also needs to be reused as a component, not just used in the Collection interface.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template