What is the effect of keeping a constructor private Code Example
what is the effect of keeping a constructor private
By providing a private constructor you prevent class instances from being created in any place other than this very class. There are several use cases for providing such constructor.