Solved

What Happens If You Declare a Class Constructor to Have

Question 42

Multiple Choice

What happens if you declare a class constructor to have a void return type?


A) You'll likely receive a syntax error
B) The program will compile with a warning, but you'll get a runtime error
C) There's nothing wrong with declaring a constructor to be void
D) The class' default constructor will be used instead of the one you're declaring
E) None of the above

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions