Multiple choice

Which of the following is not a valid constructor for the class HelloWorld?

  1. public HelloWorld(){}

  2. public void HelloWorld(){}

  3. private HelloWorld(){}

  4. protected HelloWorld(){}

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

Constructor should not contain return type.