document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. class Demo
  2. {
  3.         int a,b; // instance variablles
  4.         Demo(int c,int d)//this is the user defined parameterized constructor
  5.         {
  6.             a=c;
  7.             b=d;
  8.         }
  9. }
  10.  
  11. class Test
  12. {
  13.     public static void main(String args[])
  14.     {
  15.         Demo obj1=new Demo(10,20);
  16.         System.out.println(" the value of a is = "+obj1.a);
  17.         System.out.println(" the value of b is = "+obj1.b);
  18.     }
  19. }
');