Continue with your mobile number
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.
Who among the following became the first woman to receive Sahitya Akademi Award in Maithili for her novel Marichika?
Which of the following is not among the list of special category states under the National Electricity Fund Scheme?
What is the average temperature of Human body?
Where is the first a private agricultural mandi (market) was setup in India?
What is humidity?
As of October 2019, what is the maximum amount of loan granted by a scheduled commercial bank that is covered under the Credit Guarantee Fund Scheme fo...
Indian National Space Promotion and Authorization Centre (IN–SPACe) is a single-window autonomous agency under the Department of Space. Who is the cur...
Which states are included in Vandhada Water Disputes Tribunal?
Syed Modi India International is organised in which sporting event?
The least perfect square number which is divisible by 9, 12, 15, 24: