title: Java constant examples (Create a java file having only constants)
body: <p>What is the best practice to declare a java file having only constant?</p>
  
  <pre><code>public interface DeclareConstants
  {
      String constant = "Test";
  }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>public abstract class DeclareConstants
  {
      public static final String constant = "Test";
  }
  </code></pre>