fork download
  1. class array_output {
  2. public static void main(String args[])
  3. {
  4. int array_variable [] = new int[10];
  5. for (int i = 0; i < 10; ++i) {
  6. array_variable[i] = i;
  7. System.out.print(array_variable[i] + " ");
  8. i++;
  9. }
  10. }
  11. }
Success #stdin #stdout 0.09s 43988KB
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
0 2 4 6 8