A constructor can be private. True or false

True. Why? Because to prevent instantiation outside of the object, for a case of singleton object or factory method

results matching ""

    No results matching ""