encapsulation vs abstraction

Ads
 

encapsulation vs abstraction

what is the difference between encapsulation and abstraction ?

View Answers

February 17, 2011 at 3:24 PM

Difference between Encapsulation and Abstraction

Abstraction is virtual class design whereas Encapsulation is data hiding.

Encapsulation-Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.In other words, encapsulation is the ability of an object to be a container (or capsule) for related properties (ie. data variables) and methods (ie. functions).

Abstraction-The process of abstraction in Java is used to hide certain details and only show the essential features of the object. In other words, it deals with the outside view of an object (interface).

Ads









Related Tutorials/Questions & Answers:
encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction
diff between encapsulation and abstraction code
diff between encapsulation and abstraction code  diff between encapsulation and abstraction code
Advertisements
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
Difference between Encapsulation and Abstraction in Java
In this section we will discuss about the difference between Encapsulation and Abstraction in Java. Encapsulation is a process of hiding all the data and methods within a class from outside world. Abstraction on the other hand
encapsulation
encapsulation   how encapsulation is achieved? if i write private variables in my source code, it will achieve encapsulation. this statement is true in all cases
abstraction
abstraction  give a simple example program for abstraction   public class Animal { double energyReserves; boolean isHungry() { return... is an abstraction used in place of an actual animal
abstraction
abstraction  give a simple example program for abstraction  ... is an abstraction used in place of an actual animal.*/   public class Animal...); } } } /*In the above example, the class Animal is an abstraction used in place
Encapsulation in Java
Encapsulation along with Inheritance, Polymorphism, and Abstraction are the four concepts of Object Oriented Programming (OOPs). Encapsulation in Java... and provides access to them by public methods. Encapsulation is a type of data
Encapsulation versus Absraction
Encapsulation versus Absraction  I believe no one in this world knows real difference between Encapsulation and Abstraction , one of them is me as well but if there is anyone who really understand the difference please help me
Abstraction In Java for Java beginners
. Abstraction is one of the 5 fundamentals of OOPS: Abstraction Encapsulation...Abstraction In Java for Java beginners  Hi, As a beginner in Java I am looking for good tutorial that explains the Abstraction concept in Java
Encapsulation in Java
Encapsulation in Java Encapsulation is one of the important feature of object... in to a single unit is called Encapsulation. It means hiding the data and function from the  outside world. Encapsulation can be achieved by making the member
getResourceAsStream() vs FileInputStream
getResourceAsStream() vs FileInputStream  getResourceAsStream() vs FileInputStream
Encapsulation in Java Programming
Encapsulation in Java - One of the 4 OOPs concept In this video tutorial I will explain you the Encapsulation concept of the Java Programming language. Encapsulation is one of the 4 OOPs concepts and other three concepts
ModuleNotFoundError: No module named 'abstraction'
ModuleNotFoundError: No module named 'abstraction'  Hi, My Python... 'abstraction' How to remove the ModuleNotFoundError: No module named 'abstraction' error? Thanks   Hi, In your python environment
What is Abstraction In Java?
What is Abstraction In Java?  Hi, What is Abstraction In Java? How to use the Abstraction In Java to write program? Thanks   Hi, Suppose... external access. This process of hiding/securing the class is know as Abstraction
Abstraction In Java
Abstraction In Java In this section we will read about the abstraction in Java. Java is an Object Oriented Programming language and Abstraction is one of the feature of OOPs i.e. Java has the feature of abstraction. In Java abstraction
websphere vs weblogic
websphere vs weblogic  websphere vs weblogic Why you are using websphere instead of weblogic
oracle vs sql
oracle vs sql  what is the difference between oracle and sql
Encapsulation in Java 7
Encapsulation in Java 7 This tutorial describe concept of  Encapsulation. It is one of OOPs concept. Encapsulation : Encapsulation is a way of wrapping up data and methods into a single unit. Encapsulation puts the data safe from
ModuleNotFoundError: No module named 'project-abstraction'
ModuleNotFoundError: No module named 'project-abstraction'  Hi, My... named 'project-abstraction' How to remove the ModuleNotFoundError: No module named 'project-abstraction' error? Thanks   Hi
Spring Abstraction with Redis
Spring Abstraction with Redis  Hi.. I have implemented @Cacheable for one method like @Cacheable("parameter1") public String getCompaniesList(String parameter1, String parameter2) throws Exception { //code
JETM vs Jprofiler
JETM vs Jprofiler  Can anyone explain the difference between Java Execution Time Measurement(JETM) and Jprofiler
compiler vs interpreter
compiler vs interpreter  "compiled program executes faster especially if the program contains loop" Why
Interface vs abstract class
Interface vs abstract class  Hai, Is there any possible to defining abstract methods in Interface
Derby vs MySQL - SQL
Derby vs MySQL  Hi, I want to know what are the advantages using Derby Database over MySQL.  http://www.roseindia.net/eclipse/plugins/database/index.shtml
inheritence Vs inheritence
inheritence Vs inheritence  what are difference b/w c++ inheritence and java inheritence   Hi Friend, C++ supports Multiple Inheritance while Java does not. Thanks
java vs vb
java vs vb  history of java and advanced products as well as vb? compared with java and vb? finalize list out the table of java and vb products? viewers i want more soon
Abstraction in Java
Abstraction in Java Abstraction is one of the four pillar of OOPS Concept. Abstraction in java is a process by which hiding the irrelevant data  and exposing only the essential feature of object. In java Abstraction
Java Encapsulation Example
Java Encapsulation Example In this section we will read about how to achieve the Encapsulation, feature of OOPs, in Java. Encapsulation is one of the concept of OOPs. Encapsulation is mechanism for hiding informations. This mechanism

Ads