Constructor and it’s type in Java

Constructor and it’s type in Java : Constructor is nothing but a block (Similar to method) having same name as that of class name.Constructor does not have any return type, even not void.The only modifiers applicable for constructor is Public, Protected, Default and Private.It executes automatically when we create an object. Use of Constructor:-To initialize … Read more