What is Encapsulation in C plus in Hindi
What is Encapsulation in C++ in Hindi Encapsulation Object-Oriented
Programming (OOPs) में एक fundamental concept है जो data के bundling और उस data
पर operate होने वाली Methods को single unit में combine करता है, जिसे एक Class
कहा जाता है।
“Data और functions को एक साथ एक class के अंदर रखना encapsulation कहलाता है.”
Are Encapsulation and Information Hiding the Same
Encapsulation और Information Hiding
Object-Oriented Programming,में संबंधित Concepts हैं, लेकिन वे
बिल्कुल समान नहीं हैं।
Encapsulation refers to the bundling of data and methods into a
single unit (a class) and the restriction of direct access to the object's
internal state. Encapsulation provides a mechanism for controlling access
to the object's data and methods, which can help to ensure that they are
used correctly and consistently.
Information hiding, on the other hand, is the practice of limiting
access to the details of an object's internal implementation. Information
hiding is closely related to encapsulation, as encapsulation is one
technique that can be used to achieve information hiding. By encapsulating
data and methods within a class, you can limit access to the object's
internal state, thereby achieving information hiding.
Source :- Chat GPT
Post a Comment