logo

AQA A-Level Computer Science practice

What is instantiation in object-oriented programming?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Programming paradigms

Exam-style question

Try this first

What is instantiation in object-oriented programming?.

  1. A.Hiding all methods in a class
  2. B.Creating an object based on a class using a constructor
  3. C.Combining two classes using a white diamond
  4. 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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions