Listlist[]=new ArrayList[2];
list[0]=Arrays.asList(new Integer[]{1,2,3});
System.out.println(list[0]);
CONSOLE LOG
Exception in thread "main" java.lang.ArrayStoreException: java.util.Arrays$ArrayList
at problems.codechef.Experiment.main(Experiment.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Can anyone tell me what is the bug in this code.