title: How to get and compare the value results of a map<Integer, Integer>
body: <p>By calling a method ,at my case countInNumbers, is returning results as an array.</p>
  
  <pre><code>System.out.println(countIntInNumbers(Array));
  </code></pre>
  
  <p>result: </p>
  
  <pre><code>{1=17, 2=10, 3=16, 4=17, 5=13, 6=22, 7=10, 8=15, 9=16, 10=19, 11=11, 12=15, 13=16, 14=13, 15=19, 16=17, 17=13, 18=21, 19=19, 20=15,}
  </code></pre>
  
  <p>I  try to separate the numbers on different table depending their total value.
  Example... I want to display the numbers that their total is between 3 and 4 to separate table than the other numbers.</p>
  
  <p>Facing this problem cause the results as you may notice are Map since i am new in Java and I am so confused at this point.</p>
  
  <p>Anyone can suggest from something to start of?</p>
  
  <p>Updated:::
  countIntInNumbers method as follows</p>
  
  <pre><code>public static Map&lt;Integer, Integer&gt; countIntInNumbers(int[][] mat) {
      Map&lt;Integer, Integer&gt; intOccurences = new HashMap&lt;&gt;();
      for (int[] row : mat) {
          for (int intInRow : row) {
              Integer occurences = intOccurences.get(intInRow);
              if (occurences == null) { // first occurrence
                  intOccurences.put(intInRow, 1);
              } else { // increment
                  intOccurences.put(intInRow, occurences.intValue() + 1);
              }
  
          }
  
      }
      return intOccurences;
  </code></pre>