1. Handling of hashcode and equals:
1) rewrite hashcode as long as you rewrite equals;
2) If an object is to be stored with set, the two methods must be overridden.
3) If the custom object is used as a key for the map, you must override both methods.
2, ArrayList sublist can not be strong to ArrayList, return is ArrayList of the inner class sublist. It is a view of the ArrayList, and all operations are mapped to the original table.
3. Set to array using ToArray (t[] array).
4, arrays.aslist the array to the collection can not be used to modify, delete, new, because the return is an internal class of Arrays, reflecting the adapter mode.
5, comparator must meet the following conditions:
1) x, Y and y,x compare to the opposite.
2) X>y,y>z x > Z
3) X=y, then x and Z,y and Z compare the same results.
Java Protocol Collection Processing