Start learning 50% faster. Sign in now
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.
How many additional capital buffers will HDFC Bank need to maintain as per the D-SIB framework from April 1, 2025?
Who was honored with the Lata Deenanath Mangeshkar award for their contributions to the nation?
Consider the following statements about the Africa Clean Cooking Summit held in Paris:
1. The summit addressed health and environmental problems ...
What initiative did India showcase at the 112th session of the International Labour Conference (ILC) as a best practice?
Recently, In order to reach seventeen lakh defense pensioners nationwide, the Defence Ministry has inked an MoU with which two banks?
Who inaugurated the International Gita Festival in Haryana, and which state is the partner state for the festival this year?
Who has been appointed as the next President of the African Development Bank (AfDB)?
Which of the following is an umbrella organisation for operating retail payments and settlement systems in India?
Recently which district of Madhya Pradesh has become a fully functionally literate district?
What is the focus of Swapna Liddle's book, The Broken Script: Delhi Under The East India Company And The Fall of The Mughal Dynasty, 1803-1857?