Asked questions based on oops and collections.
Sigiloso
OOPS organizes code into objects and classes. It is based on four main principles: Encapsulation, Inheritance, Polymorphism, and Abstraction. It helps to reuse code, reduce complexity, and make programs modular. Collections are used to store and manage groups of objects efficiently. They include interfaces like List, Set, and Queue under the java.util package. List allows duplicates, Set doesn’t, and Queue follows FIFO order.