title: Confusion on call Java Interface method
body: <p>Let's say I have an interface A, defined as follows:</p>
  
  <pre><code>public interface A {
    public void a();
  }
  </code></pre>
  
  <p>It includes method called <code>void a();</code></p>
  
  <p>I have a class which implements this interface and has only one method:</p>
  
  <pre><code>    public class AImpl implements A {
         @Override
         public void a() {
             System.out.println("Do something");
         }
      }
  </code></pre>
  
  <p>Q: If in the main class, I call interface method, will it call the implementation belonging to class which implements the interface?</p>
  
  <p>For example:</p>
  
  <pre><code>public static void main(String[] args){
    A aa;
    aa.a();
  }
  </code></pre>
  
  <p>Will this print "Do something"?</p>