title: Constant Interface Anti-Pattern Clarification
body: <p>I just read somewhere that having an interface with common project constants is bad practice and also known as the <a href="http://en.wikipedia.org/wiki/Constant_interface" rel="noreferrer">Constant Interface Anti-Pattern</a>. If I understood this correctly, the reason provided was that once implemented, the class would expose these constants to the public.</p>
  
  <p>Well, I don't understand the need for 'implementing' in the first place. Isn't it possible to just use these static constants directly? So why do I have to go through the trouble of <code>import static</code> when I can do something like:</p>
  
  <pre><code>interface Constants {
      public static final int FOO_1 = 1;
      public static final int FOO_2 = 2;
  }
  
  public class Test {
      public static void main(String[] args) {
          System.out.println(Constants.FOO_2);
      }
  }
  </code></pre>
  
  <p>I would appreciate any guidance to help me understand this a bit more.</p>