title: What You Can’t Do with Generic Types
body: <p>I was going through the Java Generics and found the following limitation :- </p>
  
  <ol>
  <li>Create an array of that static type. This one is the most annoying, but it makes sense
  because you’d be creating an array of Objects.</li>
  <li><p>Call <code>instanceof</code>. This is not allowed because at runtime <code>List&lt;Integer&gt;</code> and
  <code>List&lt;String&gt;</code> look the same to Java thanks to type erasure.
  But the following code is compiled fine.</p>
  
  <pre><code>interface Shippable&lt;T&gt; {
    void ship(T t);
  }
  class ShippableAbstractCrate&lt;H&gt; implements Shippable&lt;H&gt; {
    public void ship(H t) {
      if(t instanceof Object) {
        //do something 
      }
    }
  }
  </code></pre></li>
  </ol>
  
  <p>3.Create a static variable as a generic type parameter. This is not allowed because the
  type is linked to the instance of the class.</p>
  
  <p>Can you please provide the clarification with  examples.
  I'm asking why all 3 points are limitation in generics ?</p>