constructor is a special method
in java. the purpose of the constructor is to assign values to the
instance variable when the object is created for the first time. the
name of the constructor is same as the class name. to call the
constructor in two ways.with new operator eg: Test t1=new Test(); here
Test() is nothing but to call the construtor of class.with
newInstanceOf() method in Class class eg: object
obj=class.newInstance();