Question OOP-ENC-0050
MediumWhat does a class invariant mean?
- A.
A static method
- B.
A constant defined in an interface
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
What does a class invariant mean?
A static method
A constant defined in an interface
Sign up free to see the answer and a step-by-step explanation.
A variable that never changes
A condition about the object's state that its methods always keep true, such as balance ≥ 0