aman bisht wrote: public static void main(String args[]){ List list=new ArrayList(); list.add("1"); list.add("2"); list.add("3"); Iterator s=reverse(list); for(Object obj:s) System.out.println(obj+", "); } public static Iterator reverse(List l){ Collections.reverse(l); return l.iterator(); } When i compile it it says gives error inside for loop that i'm not able to understand ..Please Explain this problem that is occurring..
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.