java array of generic type code example
Example: java generic array
public <T> T[] getArray(int size) {
T[] genericArray = (T[]) new Object[size];
return genericArray;
}
public <T> T[] getArray(int size) {
T[] genericArray = (T[]) new Object[size];
return genericArray;
}