0
Private constructor
What is useful from a private constructor? Besides making the class can't be instantiated? In case of java?
1 Resposta
+ 1
Private constructors are often used along with a Static method that will create or return an instance of itself within that method. Usually used with the singleton design pattern.
https://www.tutorialspoint.com/java/java_using_singleton.htm