Question
Which of the following best illustrates Encapsulation
in Object-Oriented Programming?Solution
Encapsulation is a key OOP principle that involves combining data (fields) and methods (functions) into a single unit (class) and controlling access to them using access modifiers like private, protected, and public. For instance, a BankAccount class might hide its balance field (using private access) and expose methods like deposit() and withdraw() to manipulate it. Encapsulation ensures data integrity and security , preventing unauthorized access or modifications. Why Other Options Are Incorrect : 2. Allowing multiple objects to interact through message passing : This describes Message Passing , which focuses on communication between objects. 3. Hiding complex implementation details from the user : This is Abstraction , not Encapsulation. 4. Enabling a class to inherit properties and methods from another class : This refers to Inheritance , unrelated to Encapsulation. 5. Defining a one-to-many relationship between objects : This aligns with Aggregation or Composition , not Encapsulation.
- Which is not correct regarding SVAMITVA scheme: - 
- The ‘Nomadic Elephant’ is a joint military exercise between India and which of the following countries? 
- Following Rome's withdrawal, which city has been selected to host the 2027 World Athletics Championships? 
- Identify the position of stomata in plants. 
- The Ancient Monuments Preservation Act was enacted in the year ______. 
- hich company introduced the mobile app Shopsy in July 2021, enabling people in India to start their own online reseller business? 
- Which Indian athlete has clinched India's First Judo Medal at the Olympics, 2018? 
- Who among the following was appointed, to the UN tax committee in July 2021, as a member for the 2021 to 2025 term? 
- ________, who passed away in May 2017, was the first woman to become Chief Justice of a High Court in India. 
- Who won the Bal Sahitya Puruskar 2019 in Hindi language?