• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iterator for an array

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My friend sent me this code and asked me about the for loop there.


I said it will not work in 1.4 and though i bragged about enhanced-for loop in java 5., for the initial 2-3 mintues i was trying to fix an iterator for the variable 'list' even to put a breaking-point of hasNext() as the 'for condition'.

Only later i realaized... list was not a List... it was array.
[ January 17, 2008: Message edited by: Akhilesh Trivedi ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic