Solved

What Happens If You Declare a Class Constructor to Have

Question 31

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents