/***************************************************************
 ** This Java program to illustrates COMMA operator and FOR loop
***************************************************************/
import java.io.*;

public class CommaAndForLoop
{
  public CommaAndForLoop()
    {
      int   LoopCounter_1,
            LoopCounter_2,
            LoopCounter_3;
      int   Count = 0;

      System.out.println("Loop Counter \t\t Loop Counter Value\n");
      for( // initialization section
                LoopCounter_1 = 0,
                LoopCounter_2 = 0,
                LoopCounter_3 = 0
//         int  LoopCounter_4 = 0 is not allowed??
                ;  // end of initialization section
          // testing section
                (LoopCounter_1 <= 5)
             && (LoopCounter_2 <= 6)
             && (LoopCounter_3 <= 7)
             ;  // end of testing section
        // incrementation section
          LoopCounter_1++,
          LoopCounter_2++,
          LoopCounter_3++
         )
        {
          Count++;
          System.out.println(Count + ") LoopCounter_1 \t\t" + LoopCounter_1);
          System.out.println(Count + ") LoopCounter_2 \t\t" + LoopCounter_2);
          System.out.println(Count + ") LoopCounter_3 \t\t" + LoopCounter_3
                             + "\n");
	  }
    }
  /****************************************************/
  public static void main(String [] args)
  {
    CommaAndForLoop MyCommaAndForLoop = new CommaAndForLoop();
	 try
	 {
		   System.in.read();
	 }
	 catch(Exception MyException)
	 {
		 //do nothing
	 }

  }
}
