Solved

What Happens If You Declare a Class Constructor to Have

Question 40

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

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