java generic array 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;
}