Exam-style question
Try this first
What is instantiation in object-oriented programming?.
- A.Hiding all methods in a class
- B.Creating an object based on a class using a constructor
- C.Combining two classes using a white diamond
- D.Replacing an inherited method with a property
Answer and explanation
Concise answer
Creating an object based on a class using a constructor
Why this is correct
Objects based on a class are created using a constructor, which may be implicit or explicit. A reference to the object is assigned to a reference variable of the class type.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
