+ 6
In simple word Hiding your variables or method outside from class. This behavior can be achived via using private (access-modifire)
23rd Dec 2019, 11:19 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 5
And best example for encapsulation is Class. In class, you encapsulate data members(variables) and methods into a one single unit. class A { //Variables declarations.. .. //Methods implementations... }
23rd Dec 2019, 1:11 PM
Jayakrishna 🇮🇳
+ 3
Wrapping data and function into I single entity .... This is related to the object oriented bro...
24th Dec 2019, 6:08 AM
Pinu Kithana
Pinu Kithana - avatar
+ 3
Wrapping data and function into I single entity .... This is related to the object oriented bro...
24th Dec 2019, 6:08 AM
Pinu Kithana
Pinu Kithana - avatar
+ 3
simply, encapsulation means wrapping up of data and functions into a single unit normally called a ‘class’ It is one of the basic concepts of object oriented programming languages
24th Dec 2019, 6:27 AM
Ehsaas Thakur
Ehsaas Thakur - avatar
23rd Dec 2019, 11:06 AM
Fernando Pozzetti
Fernando Pozzetti - avatar
+ 2
Encapsulation simply means binding object state(fields) and behaviour(methods) together The main idea behind encapsulation is to hide the implementation details from users.
24th Dec 2019, 6:40 AM
Hasini
+ 2
It is one of the OOP fundamentals. It allows the programmer to use private attributes in a class and these attributes are only accessible through get and set methods. This allows more manageable code and allows the validation of these attributes before being used by other classes. Changing becomes in one place.
25th Dec 2019, 7:11 PM
Malda Tabbah
Malda Tabbah - avatar
+ 1
Encapsulation Think of it as a family, where some members of the family are not at all allowed to come out and talk with others (private), the communication is through the elders to the whole family, with the outside world(public)
25th Dec 2019, 9:24 AM
Narayan Bhat
Narayan Bhat - avatar
0
Is conception to protect data.
24th Dec 2019, 6:54 PM
Tarcísio Dantas Câmara
Tarcísio Dantas Câmara - avatar