fork download
  1. class comma_operator {
  2. public static void main(String args[])
  3. {
  4. int sum = 0;
  5. for (int i = 0, j = 0; i < 5 & j < 5; ++i, j = i + 1)
  6. sum += i;
  7. System.out.println(sum);
  8.  
  9. }
  10.  
  11. }
Success #stdin #stdout 0.07s 45052KB
stdin
public class MyParameterizedConstructor
{
   private String name;

   public MyParameterizedConstructor(String str){
       this.name = str;
        System.out.println("I am inside parameterized constructor.");
        System.out.println("The parameter value is: "+str);
    }

   public static void main(String a[]){
     MyParameterizedConstructor mpc = new MyParameterizedConstructor("Madhu Raj");
   }
 }
stdout
6