title: How to store a map's (eg: HashMap<Character, Integer>map) integer value into an int array[]?
body: <p>Currently it is storing a single value to all indexes of the array and stores 
  the last one at the end. 
  I want to store all of the values of the map into an int array[].
  I am tying something like:</p>
  
  <pre><code>HashMap&lt;Character, Integer&gt; map = new HashMap&lt;&gt;();
  int values[] = new int[map.size()];
  
  for(int v: map.values()){
  
      for(int i=0;i&lt;values.length;i++){
          values[i] = v;              
                                      }
                          }
  </code></pre>