Java examples for Language Basics:for
Declare multiple variables in for loop
public class Main { public static void main(String[] args) { for(int i=0, j=1, k=2 ; i<5 ; i++) System.out.println("I : " + i + ",j : "+ j + ", k : " + k); }//from w w w . ja v a 2 s . co m }