What is data abstraction & Encapsulation ? With example ...
Abstraction shows you only the required things and hide the unnecessary part..for let us take the example of our mobile phone we can use the application only can't see the code written inside it..
and and encapsulation means Wrapping both data and function into a single unit...it best ex is a capsule..different types of medicines are wrap inside it..
Abstraction is concept and encapsulation is the way to achieve it.. When u look at car u look at it is one object.. You are not interested in how engine works how steering turns the wheel.. Rather you are interested in driving the car .. To achieve same thing in java you use encapsulation...
Encapsulation means controlling access to most important part of the object (data) by using setters and getters method
Ans: Abstraction means variables and method can be declared and partial implemented. An abstract class contain at least one abstract class.abstract class can't object created.
Encapsulation is wrapping of data and methodes in to a single unit called class.
Dataabstraction is the process of hiding internal details and showing only essential data.i think a best example of dataabstraction is mobilephone it self..when we want to call some one we just dial the number and press the call button.we dont know the actual process that takeplace during calling..
data abstraction is the act of representing essential feaures without knowing background detail..
Encapsulation is the process of wrapping data and function together in an object oriented programing...
Abstraction exa:-ATM is a good example of abstraction , we doesn't know what are all tha internal process that are going when we access it. instead we know only tha inquiries, deposit , withdraw etc.
Encapsulation exa:- ink is the important component in pen but it is hidding by same other material.
Data abstraction means working with important n essential features without having the background knoweldge but encapsulation means combination of data n functions as like a capsule is made from different-2 compounds by wrapping into a single unit same is the encapsulation
The wrapping of data and functions into a single unit is called encapsulation.
Data abstraction is the process to know the essential features and work without knowing the background details.
Abstaction means hiding unnessary process. You take example of ur tv.u use ur remote but u don't know what happence whan you press o remote key bcz it is not necessary.