pastebin

Paste Search Dynamic
Recent pastes
My Parameterized Constructor
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. public class MyParameterizedConstructor
  5. {
  6.    private string name;
  7.  
  8.    public MyParameterizedConstructor(string str){
  9.        this.name = str;
  10.         system.out.println("I am inside parameterized constructor.");
  11.         system.out.println("The parameter value is: "+str);
  12.     }
  13.  
  14.    public static void main(string a[]){
  15.      MyParameterizedConstructor mpc = new MyParameterizedConstructor("Mad");
  16.    }
  17.  }
Parsed in 0.028 seconds