title: Why would we need to allow interfaces to extend only from java.lang.Object and not any other class?
body: <blockquote>
    <p>As per my understanding from some books on Java, interfaces cannot
    extend classes.</p>
    
    <p>But all interfaces do inherit methods from Object class. Why is this
    so?</p>
  </blockquote>
  
  <p>If Interface not extend from Object class. So how this code work it?</p>
  
  <pre><code>interface A
  {    
   public boolean equals(Object o);
  
  }
  
  class InterfaceAndObjectClass
  {
  
      public static void main(String[] args)
      {
          A a = null;
  
          a.equals(null);
  
          a.hashCode();
  
          a.toString();
      }
  }
  </code></pre>
  
  <p>Please help me to explain how access the Object class method in Interface.</p>