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

Write a programme to replace the string without using replace command? This is my string. ..... s is replaced by th output is Thith ith my thtring
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package logic; ...
Mithun
How do people become Java programmers?
Before you become a Java programmer, it's important that you earn an education and learn how to code using Java. While some programmers learn how to use Java on their own, you can learn it much faster...
Rishav
0 0
5
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
Sir tell me some tips to code in java?
If you know C / C++ already, just try how will you able to achieve same examples in java. I prefer try to understand the fundamental of java and create small programs, then make the connectivity among them. Slowly build an application.
Nitinkumar
How do I show a popup message over a system tray icon/application in Java?
The java.awt.SystemTray class introduced in Java™ SE version 6 represents the system tray for a desktop. The system tray can be accessed by calling the static SystemTray.getSystemTray() method. Before...
Ajith
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

Related Lessons

Implementation: What Is JPA And JPA?
The basic Java framework to access the database is JDBC. Unfortunately, with JDBC, a lot of hand work is needed to convert a database query result into Java classes. JPA allows us to work with Java classes...

Introduction to Course Content
Video about what we are going to learn throughout the Java Training Session .

ClassNotFoundException vs NoClassDefFoundError
ClassNotFoundException NoClassDefFoundError It is an exception and happens due to programmer’s mistake and can be recovered by updating the code. Thrown when an application tries...

Overview on Auto IT and use in selenium webdriver
AutoIt v3 is a freeware BASIC-like scripting languages designed for automating the windows GUI and general scripting. It used a combination of simulated keystrokes, mouse movements and window/control manipulation...
S

What are the JSP implicit objects ?
JSP provides Nine implicit objects by default. They are as follows with corresponding Object Type: i) out --> JspWriter ii) request -->HttpServletRequest iii) response --> HttpServletResponse iv)...

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