Solved

What Happens If You Declare a Class Constructor to Have

Question 30

Multiple Choice

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


A) You will most likely receive a syntax error.
B) The program will compile with a warning but you'll get a run-time error.
C) There is nothing wrong with declaring a constructor with a void return type.
D) The class's default constructor will be used instead of the one you're declaring.
E) None of these

Correct Answer:

verifed

Verified

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

Related Questions