title: Where is Java Type Erasure. Why the codes decompiled from the .class file are exactly same to codes in java source codes
body: <p>We know "Java Type Erasure" mechanism modify types in our java source codes when they were compiled into .class file.
  But, today I use Java Decompiler to decompile a class file, it shows me the exactly same codes which I typed in the java file.</p>
  
  <p>I want to know? Where is the  "Java Type Erasure" mechanism? or how JD know?</p>
  
  <p>The java codes:</p>
  
  <pre><code>public class C1 extends C&lt;D&gt;{
  
  public C1()
  {
  
  }
  
  public void myPrint()
  {
      System.out.println("Hello C1");
  }
  
  public static void main(String[]args)
  {
      System.out.println("Test");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Codes de-compiled from .class file by JD software:</p>
  
  <pre><code>import java.io.PrintStream;
  
  public class C1 extends C&lt;D&gt;
  {
    public void myPrint()
    {
      System.out.println("Hello C1");
    }
  
    public static void main(String[] args)
    {
      System.out.println("Test");
    }
  }
  </code></pre>
  
  <p>You see, they are same, and it confused me that how "Type erasure" works?</p>