// The most common Traversal method. The most common method is the most commonly used method. Although it is not complex, it is very important. This is what we are most familiar with. I will not talk about it much !! Public static void work (Map <string, student> map) {collection <student> C = map. values (); iterator it = C. iterator (); For (; it. hasnext ();) {system. out. println (it. next () ;}/// use keyset for traversal. The advantage of this function is that you can set the value of the desired value based on the key, making it more flexible !! Public static void workbykeyset (Map <string, student> map) {set <string> key = map. keyset (); For (iterator it = key. iterator (); it. hasnext ();) {string S = (string) it. next (); system. out. println (map. get (s) ;}/// a more complex Traversal method ~~ He is very violent. He is so flexible that he can get whatever he wants ~~ Public static void workbyentry (Map <string, student> map) {set <map. entry <string, student> set = map. entryset (); For (iterator <map. entry <string, student> it = set. iterator (); it. hasnext ();) {map. entry <string, student> entry = (map. entry <string, student>) it. next (); system. out. println (entry. getkey () + "--->" + entry. getvalue ());}}}