Discussion
In object oriented programming, an abstraction that holds a collection of objects of some given class is called :
(i) Package list
(ii) Container or collection
(iii) Library
(iv) Directory list
Answer: B
The answer is (ii) only: a container or collection.
In object-oriented programming, a container (also called a collection) is an object whose job is to hold a group of other objects, such as a list, set, map or vector, and to provide operations to add, remove and iterate over them.
A package groups classes, a library is a set of reusable code, and a directory list is a file-system listing. None of these is the abstraction that holds objects of a class, so options naming them are wrong.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development