Question: Why do we add a private constructor to a utility class? ( Mark all correct answers if more than one is correct. ) Group of
Why do we add a private constructor to a utility class?
Mark all correct answers if more than one is correct.
Group of answer choices
To inhibit external instantiation of the class.
To prevent a public default constructor from being automatically added to the class.
We should NOT add a private constructor to a utility class. It is not correct to do so
There is no such thing as a private constructor.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
