Multiple choice technology programming languages

Can a constructor be declared as private?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A constructor can be declared as private. This is a common design pattern in Java, frequently used to prevent instantiation or to implement the Singleton pattern.