title: Marker Interfaces, Implementing vs Importing
body: <p>If I have a simple marker interface (contains no methods) which contains constants used throughout my application, is there any difference between a class importing the interface and actually implementing the interface?</p>
  
  <p>Interface:</p>
  
  <pre><code>public interface MyConstants {
      String constant1 = "constant1";
      String constant2 = "constant2";
  }
  </code></pre>
  
  <p>Implementing:</p>
  
  <pre><code>public class MyClass implements MyConstants {
      public MyClass(){
          System.out.println(constant1);
      }
  }
  </code></pre>
  
  <p>Importing:</p>
  
  <pre><code>import common.constants.MyConstants
  public class MyClass {
      public MyClass(){
          System.out.println(MyConstants.constant1);
      }
  }
  </code></pre>