Where and how can you use a private constructor? - JAVA Interview Questions

Where and how can you use a private constructor?


Private constructor can be used if you do not want any other class to instantiate the class. This concept is generally used in Singleton Design Pattern. The instantiation of such classes is done from a static public method.



Click Here to See Answer .....
Did you like this article ?
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.

0 comments:

Related JAVA Questions Posts