I have got some issues in below codelines written in java 8
List<List<Integer>> list = Arrays.asList(Arrays.asList(1, 3), Arrays.asList(1, 2), Arrays.asList(1, 2));
Integer[][] arr1 = list.stream().map(l ->l.stream().mapToInt(Integer::intValue).toArray()).peek((x)->System.out.println(x[0]+","+x[1])).toArray(Integer[][]::new);
There is no compilation error at all; But I am getting exception as below.
Although I am not getting any issue with primitive types but above stream fails with autobox the values. Please help.