The API shows "Arrays.asList(Object)" so the argument could be an Object instead of int. I tried this code and worked fine as you wanted it to do. I could not understand "for(Integer t: array)", how could I get this to work.
posted 13 years ago
Thanks Chandu, Actually the code is for jdk 5.0 and there the API signature is
Anyway,thanks to you, now I've got the point, the parameter must be an array of Objects, so my array of primitives is interpreted as a simple object.
Oracle Certified Master Java SE6 Developer(SCJD),
OCE JEE 6 JSP and Servlets Developer,
Java EE6 Java Server Faces Developer.