Constructor : Can be overloaded, but cant be overridden, more than one constructor with the same name in the same classis called constructor overloading
--2 types---zero argument constructor (blank/default)/ parameterized constructor.
--generally constructors are declared as public or default
--constructors can be overloaded, but can’t be inherited.
--in the life time of an object the constructor is called only once
--we can’t call the constructor explicitly.
--inside the constructor not only initializing the code but also we can write any code which we want to execute at the time of object creation.
--object is created first and then the constructor is called.
--In java, in the syntax of object creation, constructor is a part, but it doesn’t mean that we are calling the constructor.
--New operator allocates memory for the object, before it returns the address of the object to be stored in the reference variable ,the constructor is called.
--if for some reasons, the constructor is not available or not accessed then the object creation is not successful.
--compiler provides one constructor for each class, the moment we write the constructor, the compiler will not provide the default constructor.
--constructor cant be private, if it is private, it cant be accessed.
--resources are allocated to an object in the constructor only.