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

Should we learn DBMS and RDBMS without any Java training?
java or i can say any programming language is not required to learn DBMS or RDBMS
Karthik
0 0
6
Which is a good Java training and placement institute for a fresher in Bangalore?
I know an institute in HYderabad which is giving 100% job guarantee or 100% fee refund. They have office in bangalore also, not sure whether they are offering this program in Bangalore. Please visit their...
Raja
0 0
5
Why is Java better than any other programming language?
Java is not necessarily "better" than every other programming language; the suitability of a language depends on the specific requirements of a project. However, Java has several strengths, including platform...
Sushil
0 0
5
Which institute is best for java core learning?
For core java RPISE(rajesh patkar classe) is very good . he thought you from the sacratch . i was did there one course, There are lots od students apart from IT backgrounf was came there and they understood...
Hrhrh
Why Java doesnot have Pointer ?
To avoid memory hacks and leaks it is an intentional decision taken by JAva Pioneers
Satyajit

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

Ask a Question

Related Lessons

Why we need to learn Programming languages?
Language is medium for communication. If two parties like to communicate or exchange the thoughts they must know a language. Language should be understandable by both the Parties. For example A wants to...

What Would Be Life Cycle Of A Fresher After Campus In An IT Company?
1. Basic Technical Training: Since freshers are not subject matter experts so gone through 3 - 6 months basic technical training within Organization. 2. Technical Assessment: HR sends freshers to various...

10 Cool SQL Optimizations That Do Not Depend On The Cost Model
Today, we don’t want to talk about cost based optimisation, i.e. optimisations that depend on a database’s cost model. We’ll look into much simpler optimisations that can be implemented...

JAVA - Object Cloning
JAVA - Object Cloning Is the way of creating the same copy of object without calling the class constructor. It means we can make any class object multiple times without calling its default constructor....

Demand of java in industry
Java is one of the widest use language in the industry all around the world As in software market more than 80% software, platform developed using java. Java comes in three flavours:- j2se for window based...

Prashant Tomer

0 0
0

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