Interviews11 answers
diffrence b/w data abstraction,encapstulation?plze explain simple sentences?
11 Answers
Data abstraction is proving only data which are needed and Encapsulation is protecting data from the outside interference
S PPosted Feb 22, 2018, 8:11 AM EST
supposed we have one baseClass in that have two method first method access modifier is public and second method access modifier is private. second private method call inside the first method. Now we are inherit baseClass to derived class ok. now in this situation calling method inside the class called abstraction and we are hiding this method from derived class called encapsulation.
Umesh GhodePosted Aug 7, 2016, 11:40 PM EDT
abstraction solve design level problem.
Encapsulation solve implementation level problem.
viknesh pPosted Sep 24, 2015, 2:37 AM EDT
Abstraction
Abstraction allows us to represent complex real world in simplest manner. It is process of identifying the relevant qualities and behaviors an object should possess, in other word represent the necessary feature without representing the back ground details. Abstraction is a process of hiding work style of an object and showing only those information which are required to understand the object. Abstraction means putting all the variables and methods in a class which are necessary.
Encapsulation
It is a process of hiding all the internal details of an object from the outside real world. The word Encapsulation, like Enclosing into the capsule. It restrict client from seeing its internal view where behavior of the abstraction is implemented. In Encapsulation, generally to hide data making it private and expose public property to access those data from outer world. Encapsulation is a method for protecting data from unwanted access or alteration. Encapsulation is the mechanism by which Abstraction is implemented.
Pankaj Kumar ChoudharyPosted Aug 29, 2015, 9:08 AM EDT
Encapsulation is hiding of data and implementation by outside world using access specifier but Abstraction is contract and hiding of Implementation by using Interface and abstract keywords.
Abstraction helps in Design level but Encapsulation helps in class level.
These are advanced concepts.
Muneer AkhtarPosted May 26, 2015, 12:51 AM EDT
Abstraction is concept. And encapsulation is hiding implementation of concept. We can take example of refrigerator Freezing is concept user Knows only cooling (Abstraction). How it is done user need not to know(Encapsulation). Only showing what is necessary is Abstraction and hiding complexity is encapsulation.
roshan jagtapPosted Sep 21, 2014, 11:45 PM EDT
abstraction emplies with the help of access modifier.
private method not accessible but public methods can accessible is ABTRACTIOn
encapsulation is we use any method without knowing its functionality is known as encapsulation.
Neeraj NegiPosted May 1, 2014, 1:49 AM EDT
Abstraction means to abstract something and encapsulation means to hide something. As the name implies the abstraction provides only abstract or brief and important summary while encapsulation hides the implementation details. The abstraction is implemented with interface and abstract class while the encapsulation are implemented with the private and public modifier.
plmPosted Mar 10, 2014, 12:03 PM EDT
encapsulation means wrapping of data inside the class and abstraction means hiding of data means background process suppose when we write console.write behind that more line of coding after that we use single line coding it means abstractions
Ashish SinghPosted Dec 21, 2013, 11:46 PM EST
encapsulation means wrapping of data inside the class and abstraction means hiding of data means background process suppose when we write console.write behind that more line of coding after that we use single line coding it means abstractions
Ashish SinghPosted Dec 21, 2013, 11:46 PM EST
encapsulation means wrapping of data inside the class and abstraction means hiding of data means background process suppose when we write console.write behind that more line of coding after that we use single line coding it means abstractions
Ashish SinghPosted Dec 21, 2013, 11:46 PM EST


