Multiple choice

Which of the following is INCORRECT regarding static constructors?

  1. There can be only one static constructor in the class.

  2. The static constructor can be parameterised.

  3. It can only access the static members of the class.

  4. There should be no access modifier in static constructor definition.

  5. The static keyword is used to declare a static constructor.

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

The static constructor should be without parameters. If a static constructor is declared parameterised, the compiler will display an error.