Objects and Collections Questions and Answers
Java Objects and Collections programming questions and answers are essential for mastering object-oriented design and data structure handling. These questions often appear in coding interviews by Infosys, TCS, and Accenture. The topic covers object creation, reference handling, garbage collection, and the use of Java Collection Framework classes like List, Set, and Map. Understanding how to manage and iterate over collections efficiently helps in building optimized programs. Practicing programming questions and answers in this area enhances both logic and coding speed—crucial skills for clearing technical interview rounds and online assessments.
Objects and Collections
Showing 10 of
38 questions
33. Which of the following is not a feature of OOP?
- Encapsulation
- Abstraction
- Compilation
- Polymorphism
34. Which method returns the size of a collection?
- count()
- total()
- size()
- number()
36. What is the default value of object reference variables?
- 0
- empty
- null
- undefined
37. Which class is best for constant-time search operations?
- LinkedList
- HashMap
- TreeMap
- ArrayList
38. What is the parent interface of all collections?
- Iterable
- Collection
- List
- Object