title: Java - Can an array be a generic parameter?
body: <p>I want to generate a parametrized class in Java like</p>
  
  <pre><code>class MyClass&lt;T&gt;
  </code></pre>
  
  <p>First question: Can T be of type Byte[]?</p>
  
  <p>Second question: If so, how can know I know that it is an array of type Byte? Usually I get the class and then check the class type. </p>
  
  <pre><code>Class typeT = (Class&lt;T&gt;)((ParameterizedType)this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
  anInstance.getClass().equals(typeT)
  </code></pre>
  
  <p>But how does it work if it is an array?</p>
  
  <p>Thank you in advance</p>
  
  <p>Altober</p>