Computer Applications
Define Encapsulation.
OOP Intro Java
ICSE 2016
12 Likes
Answer
Encapsulation is a mechanism that binds together code and the data it manipulates. It keeps them both safe from the outside world, preventing any unauthorised access or misuse. Only member methods, which are wrapped inside the class, can access the data and other methods.
Answered By
7 Likes
Related Questions
In assembly language, the instructions are given in terms of 0's and 1's.
What is the literal meaning of Polymorphism?
- Using different operations for same purpose
- Using same operation for different purposes
- Using same data in different functions
- None of them
Assertion (A): BASIC, Java, Python, etc. are some popular high level languages.
Reason (R): The instructions written in high level languages need language translators to be understood by the system.
Based on the above discussion, choose an appropriate statement from the options given below:
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
- Assertion (A) is true and Reason (R) is false.
- Assertion (A) is false and Reason (R) is true.
Which of the following is not true for Encapsulation?
- Data and functions are loosely attached.
- Data and functions are wrapped together.
- Data is secured from getting mishandled.
- None of them.