Constructors

Q1: Which of the following statements is correct about constructors?

A If we provide a one-argument constructor then the compiler still provides a zero-argument constructor.

B Static constructors can use optional arguments.

C Overloaded constructors cannot use optional arguments.

D If we do not provide a constructor, then the compiler provides a zero-argument constructor.

ANS:D - If we do not provide a constructor, then the compiler provides a zero-argument constructor.

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.