title: Java - Understanding the Class<?> type and what happen when invoking 'Type.class'
body: <p>In Java you can write the following code:</p>
  
  <p><code>Class&lt;?&gt; stringClass = String.class;</code></p>
  
  <p>The run-time will assign a reference to a Class instance represents the type java.lang.String class.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Is it guaranteed by the JVM that a Class instance is a singleton per Java type?</li>
  <li>If the answer to #1 is true - when the Class instance is being created? (- calling <code>getClass()</code> or <code>Type.class</code> or maybe when the Class loader is loading a Java type at the first time.)</li>
  <li>What happens under the hood when invoking <code>Type.class</code>. I am asking since there is no static member called <code>class</code> in the code of-course.</li>
  </ol>