title: How can instance of interface access method of Object class?
body: <pre><code>interface Intf {
  }
  
  class A implements Intf {
  }
  
  class Test {    
      public static void main(String[] args) {
          Intf obj = new A();
          obj.toString();
      }
  }
  </code></pre>
  
  <p>A friend had shown me this code, I could not explain it to him...</p>
  
  <p>We know that methods defined in 'referred' object can only be run on an instance.
  As we can see no method is defined by <code>Intf</code> but obj (which refers <code>Intf</code>) is able to call <code>toString()</code> method of Object.class</p>
  
  <p>I consoled him saying that everything is an Object in Java (though we get no autofill option in eclipse IDE against <code>Intf</code>)</p>