Real'sHowTo AddThis Feed Button
Custom Search

Multiple expressions in for loopsTag(s): Language


You do it "à la C".
public class MultipleFor{
  public static void main (String [] args){
    for (int i=0, j=0; i < 10; i++, j--)
      System.out.println ("i = " + i + " j= " + j);
    }
}

blog comments powered by Disqus


If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2013
[ home ]