Creating class for defining constants
<p>Most of the time I define constants in the same class where i want to use them.</p>

<p>But now i have to define all common constants in a separate class. I have seen two version of constants defining classes:</p>

<p>a. It will give compile time error, if you try to create object of <code>Consts</code>.</p>

<pre><code>final class Consts  {
        private Consts(){}

        public static final String TAG = "something";
    }
</code></pre>

<p>b. If will throw a run time exception, if you try to create a object of <code>Consts</code>.</p>

<pre><code> final class Consts  {
        public Consts(){
            throw new RuntimeException();
        }

        public static final String TAG = "something";
    }
</code></pre>

<p>check this class of android <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/Manifest.java" rel="nofollow">http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/Manifest.java</a> 
Why they have used second version?</p>

<p>Which one should I use and why should I go for second version?</p>
