Is it allowed to define constructor in private section of the class?If no, then give explanation for the same. If yes then explain how will it be accessible.
Yes a constructor can be defined in private section of the class. Its objects are only accessible from within the declared class. You cannot access its objects from outside the constructor class.
Comments
Leave a comment