• Post Reply Bookmark Topic Watch Topic
  • New Topic

Limit for Loop  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1784
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The faiq.getFaiqueueindexlist() is an ArrayList<Integer>. How can I change the following code to just loop over the first 50 numbers?

 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I corrected your code tags. Use the button rather than trying to enter them by hand.

You would have to use an ordinary for loopThe && will ensure you don't get an out of bounds exception if the list contains < 50 elements.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!