In the CLR&#x2F;C# for example, List&lt;int&gt; is a distinct type from List&lt;bool&gt;.  At runtime, when you create List&lt;int&gt;, the CLR will create a new type based on List&lt;T&gt; that is specialized for int.  For List&lt;bool&gt;, a new type based on List&lt;T&gt; is specialized for bool.  Then at runtime, you can test variable (if (untypedObj is List&lt;int&gt;)) because there are distinct types for each closed generic type.<p>In java, the compiler would instead (I&#x27;m simplifying here), replace List&lt;int&gt; and List&lt;bool&gt; with List&lt;object&gt;, and at runtime, you wouldn&#x27;t be able to tell a List&lt;int&gt; from List&lt;bool&gt; because their types were &quot;erased&quot; and became List&lt;object&gt;.