Regards, Abdul Mohsin
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Barry Gaunt: List<Integer> list=Arrays.asList(1,2,3,4);
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
Originally posted by Sergio Tridente: This line won't compile: It'll give: "cannot convert from List<int[]> to List<Integer>" [ May 21, 2007: Message edited by: Sergio Tridente ]
Originally posted by John Stone: Compiles & run fine with java 1.5.
sergio@linux:~> javac ArraysTest.java ArraysTest.java:7: incompatible types found : java.util.List<int[]> required: java.util.List<java.lang.Integer> List<Integer> list2=Arrays.asList(str2); ^ 1 error
SCJP 1.4 - SCJP 1.6 - OCEJWCD in progress