java condition

Discussion in 'Programming' started by Ricky siman, Jun 12, 2013.

  1. #1
    what is the difference between for and for each loop ?
     
    Ricky siman, Jun 12, 2013 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #2
    I have not much java experience, but I'm pretty sure that the for-each loop is used to more easily iterate over arrays.

    Found a link, that should provide more information
    http://www.leepoint.net/notes-java/flow/loops/foreach.html
    Code (markup):
     
    GMF, Jun 13, 2013 IP