instantiation tag

1 questions


1 answers
155 views
0
How do I create a generic array in Java?

Due to the Java generic implementation, it cannot be implemented as follows:public class GenSet<E> { private E a[]; public GenSet() { a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array cr...


© 2024 OneMinuteCode. All rights reserved.