1.

Can We Declare Constructor As Private?

Answer»
  1. Yes we can declare constructor as PRIVATE.
  2. All four ACCESS modifiers are ALLOWED to constructor.
  3. We should declare constructor as private for not to ALLOW user to create object from outside of our class.
  4. BASICALLY we will declare private constructor in Singleton design pattern.
  5. Read more at Can we create private constructor in java



Discussion

No Comment Found