title: Setting a Class(object) to a variable
body: <p>In Java, is it possible to assign a class or class object to a variable?</p>
  
  <pre><code>ThatClass obj= a; //a is any constant
  </code></pre>
  
  <p>Instead of <code>ThatClass obj=new ThatClass();</code> //where the constructor is called and the integer (or any other value) in that constructor is then called/printed (see below).</p>
  
  <pre><code>ThatClass(){
  
      final int constant=a;
      System.out.println(constant);
  
  }
  </code></pre>
  
  <p>I suspect not, but then again, Java continues to surprise me. </p>