PlayJava Day021

container:

Collection Interface: defines a way to access a set of objects, and which sub-interface Set List define the storage

List: storing data in an orderly and repeatable ----> ArrayList

Set: Data storage disorder and can not be repeated ----> HashSet

Collection way of example: container class object call remove, whether the comparison target contains equal when other methods, using the object type equals and hashCode methods

For custom type, you need to be rewritten to implement equals and hashCode method custom rule objects are equal

Note: Equal objects should have equal hash codes

Generic: current type which can store only the data sets

Iterator: iterator used to traverse the collection

Guess you like

Origin www.cnblogs.com/JavaDemo01/p/11563361.html