I have the following method that I want to pass arrays of different types:
private < E > void print(E[] arr) {
for(E s: arr) {
System.out.println(s + " ");
}
}
When I pass a List<Double> array to the print method, I get the following error:
The method print(E[]) in the type IAnalysisMocker is not applicable for the arguments (List<Double>)
Is there any suggestions of how to solve it?