Can you declare constructor privately? If so, what are the ways to access it from outside its class?
AnswerBot
1y
Yes, a constructor can be declared privately.
Private constructors are used to prevent the creation of objects of a class from outside the class itself.
To access a private constructor from outside its ...read more
Keerthi Sarla
1y
If a constructor is declared as private, then its objects are only accessible from within the declared class. You cannot access its objects from outside the constructor class.
Help your peers!
Add answer anonymously...
Top Plintron Global Technology Solutions Software Developer Trainee interview questions & answers
Popular interview questions of Software Developer Trainee
Top HR questions asked in Plintron Global Technology Solutions Software Developer Trainee
>
Plintron Global Technology Solutions Software Developer Trainee Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app