This is my code :
package ehsan;
import java.util.*;
import java.util.stream.Collectors;
public class Test {
public static void main(String[] args) {
double[] nums = new Random().doubles(120).toArray();
System.out.println(Arrays.asList(nums));
}
}
And the result I get :
[[D@3d9750]
Apperantly Arrays.asList generates a List of double[] and not double. Consequently, How can I (possibly) specify nums I am supplying to asList is a vararg not a single T?
According to the question which is suggested as the original, what changes should I make to the code?