Start learning →

Where must immutable objects be initialized in OOP?

AIn a destructor
BIn a static block
CIn a local scope
DIn a constructor
Answer & Solution
Correct answer: D. In a constructor
Immutable objects must be initialized within a constructor to ensure valid state.
Practise this question with Quill — ICSE Class 10 →

Keep practising User-Defined Methods and Constructors

Browse all User-Defined Methods and Constructors questions for ICSE Class 10, or explore more Computer Applications topics.

Start a User-Defined Methods and Constructors lesson →