robie to tak:
private T[] tab;
potem w konstruktorze:
tab = new T[10];
i nie chce sie tworzyc: 'cannot create a generic array of T'
robie to tak:
private T[] tab;
potem w konstruktorze:
tab = new T[10];
i nie chce sie tworzyc: 'cannot create a generic array of T'
W Javie masz type erasure, informacja o parametryzacji szablonów jest wycinana.
http://stackoverflow.com/questions/529085/java-how-to-generic-array-creation