Object-Oriented Programming · Question 19 · Easy
Creating an object of a class, for example with new Student() in Java, is called:
- Instantiation
- Inheritance
- Overloading
- Encapsulation
Answer and explanation
Answer: A. Instantiation
Explanation: An object is an instance of a class, so creating one is called instantiation. The new operator allocates the object and runs its constructor.
Previous: Inheritance, as in 'SavingsAccount extends Account', models which kind of… · Next: Which OOP concept means exposing only the essential features of an object…
Practise object-oriented programming
Try a fresh set of object-oriented programming questions with an explanation after every answer, free and without signing up: Object-Oriented Programming practice. Or sit a full placement mock test.
More object-oriented programming questions
- A Logger class keeps a list of log entries in a private field and offers only…
- Inside an instance method or constructor in Java, which keyword refers to the…
- Inheritance, as in 'SavingsAccount extends Account', models which kind of…
- Which OOP concept means exposing only the essential features of an object…
- What is the output of the following C++ program?
- What is the output of the following C++ program?
- What is the output of the following Python code?
- Which SOLID principle says a class should have only one reason to change?
- Which design pattern ensures that a class has only one instance and provides a…
- A House is made of Rooms, and the Rooms cannot exist without the House: when…
More technical & programming practice
DBMS · SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps · GenAI Basics · Pseudo-code
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge