title: "error: cannot find symbol HashMap"
body: <p>Trying to create (<em>or rather learn</em>) a <code>HashMap</code> in below fashion :</p>
  
  <pre><code>public class Demo{
  
       public static void main(String args[]){
          System.out.println("============Starting Hashmap============");
  
  
          //hashmap portion
          HashMap&lt;String, Integer&gt; myMap = new HashMap&lt;String, Integer&gt;();
  
          System.out.println("============Ending Hashmap============");
       }
  }
  </code></pre>
  
  <p>I am using an online complier and have searched a lot, i found that my way of declaration is correct but something else is popping up the error<br />Below is the error </p>
  
  <pre><code>Demo.java:8: error: cannot find symbol
                  HashMap&lt;String, Integer&gt; myMap = new HashMap&lt;String, Integer&gt;();
                  ^
     symbol:   class HashMap
     location: class Demo
  
     Demo.java:8: error: cannot find symbol
                  HashMap&lt;String, Integer&gt; myMap = new HashMap&lt;String, Integer&gt;();
                                                       ^
        symbol:   class HashMap
        location: class Demo
  
  2 errors
  </code></pre>
  
  <p><strong>What i need help in :</strong> m just trying to get the basic of creating a hashmap and inserting some key and value in it, but above error stopped me in very first step.....any help in solving this is appreciated!! :)</p>