public <R> R[] createArray(int length) {
return new R[length]; //Genetic Array Error
}
private static <R,D> R[] executeFunction(Function<R,D> function, D[] value) {
R[] ans = new R[value.length]; //Genetic Array Error
for (int i = 0; i < value.length; i++) {
ans[i] = function.apply(value[i]);
}
return ans;
}
如何通过遗传数组创建错误修复以下代码?