i am new in java can any one please tell me the main use of constructor
if we can use method
in what cases its necessary to use constuctor
just give it a simple though, there is Object in Java, and the Object has Method which is its accessor. SO you cannot access the Object accessor before the Object itself is created (initialized) isn't it, except the method is static (which don't necessarily the Object to be instantiated), and one way to create/instantiate an Object is to call it constructor, jvm will give empty constructor for your classess even if you don't provide one.