title: java generics: can't create a simple print array method
body: <p>So i keep on getting an error on the next code. And I have no idea what i'm doing wrong.
  The error is The method printArray(T[]) in the type main is not applicable for the arguments (int[])</p>
  
  <pre><code>public class main {
  
      public static void main(String[] args) {
          Oefening1 oef = new Oefening1();
          int[] integerArray = {1,2,3,4,5};
          printArray(integerArray);
      }
  
      public static &lt;T&gt; void printArray(T[] arr){
          for(T t: arr){
             System.out.print(t + " ");
          }
          System.out.println("");
      }
  
  }
  </code></pre>