Traverse the map elements using the iterator .
while ( iterator . hasNext ( ) ) { Map . Entry < Integer , Integer > me = iterator . next ( ) ; System . out . print ( me . getValue ( ) + " ▁ " ) ; } } }