title: how to compare hashmap in Java?
body: <p>I have two <code>HashMaps</code> and i want to compare the keys of the values and if they are different return the difference between both keys</p>
  <pre><code>public class AsciiCount {
      public static void main(String args[]) {
          String input = &quot;Hello&quot;;
          String input1 = &quot;eHllo&quot;;
          
          Store obj1= new Store();
          
          String orderOfString = obj1.CheckOrder(input);
          System.out.println(orderOfString);
          
          HashMap inputLocation = obj1.getCharacterLocation(input);
          HashMap input1Location = obj1.getCharacterLocation(input1);
          System.out.println(inputLocation);
          System.out.println(input1Location);
      }
  }
  // OUTPUT of print
  // inputLocation = {0=72, 1=101, 2=108, 3=108, 4=111}
  // input1Location = {0=101, 1=72, 2=108, 3=108, 4=111}
  </code></pre>
  <p><strong>Example</strong></p>
  <p>Here</p>
  <p>Key of 72 is 0 in <code>inputLocation</code> but key of 72 is 1 in <code>input1Location</code></p>
  <p>Key of 101 is 1 in <code>inputLocation</code> but key of 101 is 0 in <code>input1Location</code></p>
  <p>So output should be <code>2</code> ( i.e no. of changes )</p>