Question

Which statement about constructors in Object-Oriented Programming languages such as C++ or Java is correct?

A A constructor must always have an explicit return type, typically void, matching the class name
B A constructor is automatically invoked when an object of the class is created, and it shares the same name as the class with no return type at all
C A class can define only one constructor, and constructors cannot be overloaded
D Constructors can be inherited and overridden in derived classes exactly like regular member functions
E A constructor must always accept at least one parameter in order to properly initialize an object
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)