Start learning 50% faster. Sign in now
Encapsulation is a cornerstone of OOP that enforces data hiding by restricting direct access to an object’s internal state. 1. Data Protection: By using access modifiers (e.g., private, protected), encapsulation shields sensitive data from external manipulation. 2. Clear Interfaces: Through getter and setter methods, encapsulation provides controlled interaction with an object’s data, ensuring integrity and security. 3. Modularity: Encapsulation helps developers manage code complexity by compartmentalizing data and behavior within distinct classes. Thus, encapsulation creates a robust framework for managing dependencies and ensuring secure object interactions. Why Other Options Are Incorrect: • A) Abstraction: Focuses on hiding implementation details but differs by emphasizing interface design. • B) Polymorphism: Deals with dynamic behavior and method variability, unrelated to data hiding. • D) Inheritance: Describes property/method sharing between classes, not encapsulation. • E) Composition: Involves constructing objects using other objects, unrelated to access control.
Which of the following rivers in India are western flowing?
1. Shetruniji river
2. Mahi river
3. Vaitarna river
4. Sharavati...
India shares its border with which of the following countries?
A state in India has the following characteristics:
1. Its northern part is arid and semi-arid.
2. Its central part produces cotton. ...
From which state does the Godavari River originate?
Which river is the longest river in India?
Which of the following states is NOT part of the Peninsular Plateau in India?
The other name of ‘Swaraj Island’ is ________.
Which of the following river forms Inland drainage basin?
1. Kantu river
2. Sukri River
3. Sabarmati River
4. Ghaggar river<...
Consider the following pairs:
Place of Pilgrimage Location
1. Srisailam Nallamala Hills
2. Om...
In which of the following regions of India are shale gas resources found?
1. Cambay Basin
2. Cauvery Basin
3. Krishna-Godavari Basi...