title: Can HashMap contain custom class for key/value?
body: <p>In HashMap&lt;<em>K</em>,<em>V</em>>, can <em>K</em> or <em>V</em> be custom class object instead of wrapper class objects??</p>
  
  <pre><code>import java.util.HashMap;
  import java.util.Map;
  
  public class Test {
  
      public static void main(String[] args) {
          Test test=new Test();       
          HashMap&lt;String, test&gt; a= new HashMap&lt;String, test&gt;();
      }
  }
  </code></pre>
  
  <p>Error occurs: test cannot be resolved to a type.</p>
  
  <p>Thanks in advance.
  Regards.</p>