UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is the difference between abstraction and encapsulation?

Asked by Last Modified  

24 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Experienced Java Professional

Encapsulation is wrapping, just hiding properties and methods. Encapsulation is used for hide the code and data in a single unit to protect the data from the outside the world. Class is the best example of encapsulation. Abstraction refers to showing only the necessary details to the intended user or...
read more
Encapsulation is wrapping, just hiding properties and methods. Encapsulation is used for hide the code and data in a single unit to protect the data from the outside the world. Class is the best example of encapsulation. Abstraction refers to showing only the necessary details to the intended user or hiding the implementation details. read less
Comments

Tutor

Abstraction is the Methodology. Abstraction means hiding the things, that can be either data or implementation or complexity or anything. So that how you are achieving abstraction means through Encapsulation, Abstract classes or Interfaces. Encapsulation means "minimizing inter-dependencies among...
read more
Abstraction is the Methodology. Abstraction means hiding the things, that can be either data or implementation or complexity or anything. So that how you are achieving abstraction means through Encapsulation, Abstract classes or Interfaces. Encapsulation means "minimizing inter-dependencies among separately-written modules by defining strict external interfaces". That means when we giving data as private and to access that data we are providing getters and setters so that we can access that data. By doing like this you are not preventing the data you are controlling the data if you want to give permission to update or insert then only you can provide setter otherwise you can provide only getter and any validations like age can be only positive we can't give negative but int can accept both like these controlling you can give it in setter methods. This is Encapsulation. read less
Comments

16 Yrs of Experience in Teaching

Focusing on the essential features without including background information means u are going to purchase bike that time u are just asking tell me prize color mileage but u never ask is it bike? moving on road or sky? because that information is already there , no need to ask background information and...
read more
Focusing on the essential features without including background information means u are going to purchase bike that time u are just asking tell me prize color mileage but u never ask is it bike? moving on road or sky? because that information is already there , no need to ask background information and encapsulation means wrapping of data and its function into single unit means think student no name age and getRecord printRecord in single class. read less
Comments

Trainer

Abstraction: User requires only some part of the available data, in this case we can hide the unnecessary data from the user and expose only that data which is of interest to the user, this is called abstraction. - Shows only necessary details. Encapsulation: Binding of members of one class in single...
read more
Abstraction: User requires only some part of the available data, in this case we can hide the unnecessary data from the user and expose only that data which is of interest to the user, this is called abstraction. - Shows only necessary details. Encapsulation: Binding of members of one class in single unit is called encapsulation. Hide data in single unit and protect it from outside world. read less
Comments

More than 12 years of experience in IT Industry including Science/Computer teaching

Abstraction and Encapsulation in Java are two important Object oriented programming concept and they are completely different to each other. 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...
read more
Abstraction and Encapsulation in Java are two important Object oriented programming concept and they are completely different to each other. 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. Abstraction is the concept of hiding irrelevant details.In other words make complex system simple by hiding the unnecessary detail from the user. Abstraction is implemented in Java using interface and abstract class while Encapsulation is implemented using private, package-private and protected access modifier. read less
Comments

Experienced Software Professional

Abstraction is related to separating interface from implementation. It is the process of actually hiding the implementation behind an interface. Encapsulation is a technique used for hiding the properties and behaviours of an object and allowing outside access only as appropriate. It prevents other...
read more
Abstraction is related to separating interface from implementation. It is the process of actually hiding the implementation behind an interface. Encapsulation is a technique used for hiding the properties and behaviours of an object and allowing outside access only as appropriate. It prevents other objects from directly altering or accessing the properties or methods of the encapsulated object. read less
Comments

Java Trainer

Abstraction is process to hiding implementation, encapsulation is process of binding state and behavior of a class and controlling what should be visible to other classes.
Comments

Tutor

Encapsulation is data hiding and abstracting is data limiting or shortening the access.
Comments

B.E. (IT)

Encapsulation, at least in the OOP sense, is specifically about hiding implementation and state behind an interface. Abstraction is a more general term. It doesn't necessarily have to hide implementation or state, but it tends to do that. I use abstraction to try to express concepts more clearly, and...
read more
Encapsulation, at least in the OOP sense, is specifically about hiding implementation and state behind an interface. Abstraction is a more general term. It doesn't necessarily have to hide implementation or state, but it tends to do that. I use abstraction to try to express concepts more clearly, and that means putting some implementation, and sometimes state concerns out of view, so I can focus on what I really want to talk about in the code. The purposes are different. To me, abstraction is primarily about expression in code. Encapsulation is a system design strategy. It's about keeping the design details of one entity away from the design thinking that's put into other entities, so that the only means of computation is through interfaces. read less
Comments

Senior Software Engineer

Abstraction and Encapsulation in Java are two important Object oriented programming concept and they are completely different to each other. 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...
read more
Abstraction and Encapsulation in Java are two important Object oriented programming concept and they are completely different to each other. 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. Abstraction is the concept of hiding irrelevant details.In other words make complex system simple by hiding the unnecessary detail from the user. Abstraction is implemented in Java using interface and abstract class while Encapsulation is implemented using private, package-private and protected access modifier. Abstraction and Encapsulation in Java are two important Object oriented programming concept and they are completely different to each other. 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. Abstraction is the concept of hiding irrelevant details.In other words make complex system simple by hiding the unnecessary detail from the user. Abstraction is implemented in Java using interface and abstract class while Encapsulation is implemented using private, package-private and protected access modifier. read less
Comments

View 22 more Answers

Related Questions

What's New in JDK 8 ?
1.Lamda Expressions I started with lambda expressions as this is probably the most sought after feature in the language after probably Generics/Annotations in Java 5. 2.Generic Type changes and improvements Taking...
Ashish

How to prepare for CORE JAVA for Android Developement?

Core Java is required for basic understanding of inheritance , AWT with button action programs, library usage etc then after u can genrate your logic with additional topics of Android
Rishabh
0 0
6
What are the qualities of a good Java trainer?
Good java trainers are always teaching their students with practical examples. This exactly happens in BEE Apprentice, our trainers are working in MNCs hence they are updated with technology and are best trainers.
Venu
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Recommended Articles

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more