title: Java Class and Interface Name Collision
body: <pre><code>interface A {
    void print();
  }
  
  class A implements A {
    public void print() {
      System.out.println(&quot;Hello&quot;);
    }
    public static void main(String args[]) {
      A a=new A();
      a.print();
    }
  }
  </code></pre>
  <p>When i am using this code then it is saying &quot;duplicate class:A&quot;. Why so? Can I not have same class and interface name</p>