Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners OOPS Concept Abstraction with example
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rajendra
OOPS Concept Abstraction with example
3 Answer(s)      5 years and a month ago
Posted in : Java Beginners



Advertisement
View Answers

October 13, 2009 at 5:32 PM


Hi Friend,

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).

For example, the Java Collections Framework defines the
abstraction called java.util.Map. It is an abstract view
of a software object that maps from one set of objects
into another. The class java.util.TreeMap implements the
Map abstraction.

Thanks


February 11, 2012 at 8:25 PM


print("code sample");Hi friends, I think abstraction cannot achieved without Encapsulation. Lets take a Example of Class Calculator class Calculator{ private int x; private int y; public add addition(int a,int b){ x=a; y=b; return x+y; } } User has concerned on giving input and getting output. so i have made both variables private. only method can be viewed by the user to give input....so i hide the variable which is not important for the user...he has only his concerned of getting addition of two number without knowing the internal implementation....this is example of Abstraction....

Encapsulation: since we are wrapping variables and method together into a single entity i.e class...... you can access these variables and method by creating object of the same class...this way encapsulation can be achieved....

thanks Santosh Singh



September 23, 2012 at 10:59 AM


Abstraction is the feature of OOPS in which we show the essential features of an object and suppress the unnecessary details.

E.g.

Consider a bank application in which there is a Customer Class.

Now what are the necessary details to have.

Name,address,date of birth.

We don't need how many houses he owns and what vehicles he owns so these are unnecessary details for customer object so we suppress these details in order to come up clearly with essential details i.e. Name,Address, date of birth.

Taufique.S.Shaikh



Related Tutorials/Questions & Answers:
OOPS Concept Abstraction with example - Java Beginners
OOPS Concept Abstraction with example  I am new to java. In java OOPS concept Abstraction means abstract or something. Please explain...). For example, the Java Collections Framework defines the abstraction called
Abstraction in Java 7
of OOPs concept. Abstraction :  Abstraction means hiding the unnecessary... or object.  In java, you can see concept of abstraction whenever you use... shows the abstraction concept. AbstractClass.java - This is abstract class
Advertisements
What is oops in php with example?
What is oops in php with example?  Hi, I heard some where that PHP is support OOPS and its new feature is PHP. Every is now using OOPs in PHP. What is oops in php with example? Can anyone give me code example? Thanks
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
OOPs Concept
OOPs Concept      ... the OOPs concepts along with  fundamentals  used to develop the java.... This is a technique used to create programs around the real world entities. In OOPs
What Is OOPS In Java
various languages implements the concept of OOPs. for example, Java, .NET, Python... or internet. Basics of OOPs Object Oriented Programming System is a concept..., Behavior, and Identity. for example, Car, Table, etc.   Class : In OOPs Class
Abstraction In Java for Java beginners
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.... Abstraction is one of the 5 fundamentals of OOPS: Abstraction Encapsulation
oops concepts
oops concepts  What is polymorphism?Explain with an example. What is abstraction?Explain with an example. What is inheritance?Explain with an example. What is encapsulation?Explain with an example
abstraction
abstraction  give a simple example program for abstraction  ...()) { theCow.eat(grass); } } } /*In the above example, the class Animal is an abstraction used in place of an actual animal
abstraction
abstraction  give a simple example program for abstraction  ...); } } } /*In the above example, the class Animal is an abstraction used in place...()) { theCow.eat(grass); } } } /*In the above example, the class Animal
OOPs
OOPs  What is OOps?  Object oriented programming organizes a program around its data,i.e.,objects and a set of well defined interfaces to that data.An object-oriented program can be characterized as data controlling
OOPs concepts in Java
Object-Oriented Programming (OOPs) concepts in Java helps in creating programs that are based on real world. OOPs is very flexible and compatible and hence is the most used concept in developing larger applications. The software
Abstraction In Java
of the feature of OOPs i.e. Java has the feature of abstraction. In Java abstraction.... In an abstraction information content of a concept is reduced and retain only...Abstraction In Java In this section we will read about the abstraction in Java
Abstraction : Java Glossary
. Encapsulation 2. Polymorphism 3. Abstraction 4. Inheritance In OOPs, these concepts.../beginners/oop-in-java.shtml Abstraction concept is developed to solve the complexity... Abstraction : Java Glossary   
Java & OOPs
degree Java supports Fully OOPs concept?   Java is not a fully object..., because not all values in Java are Objects. For example, the basic numeric types... the concept of interfaces
Oops Definition - Java Beginners
Oops Definition  What is Abstraction and Encapsulation? What is the Difference Between Abstraction and Encapsulation? Regards M.KethraBalan.  Hi Friend, Abstraction - The process of abstraction in Java is used
What is Abstraction - Java Beginners
What is Abstraction  What is abstraction in java? How is it used in java..please give an example also  Hi Friend, Abstraction is nothing... of a particular object or a concept and hide the other information.For example, a car
Inheritance in Java 7
This tutorial describe concept of Inheritance. It is one of OOPs concept
Polymorphism in Java 7
This tutorial describe concept of Polymorphism. It is one of OOPs concept
What is OOPs in PHP ?
What is OOPs in PHP ?   Hi, I am a beginner in PHP Programming Application. I have some doubt on What is OOPs in PHP programming. How the OOPs concept helps us in PHP Programming. Please provide me any online reference so that i
Abstraction in flex
Abstraction in flex  Hi... What keyword allows you to implement abstraction better? please tell me about it.... Thanks   Ans: Flex does not support abstart class directly. Thanks
Java7 : OOPs Concepts
JAVA7 : OOPs Concept In this section we will discuss concept of Object..., better termed as OOPs is a paradigm where everything is represented as an object.... Everything in OOPs is written inside the class so that you can reuse the class.You
An exercise using (SRS) as a blue print for Abstraction and Modeling in a one page answer. Was this example correct?
An exercise using (SRS) as a blue print for Abstraction and Modeling in a one page answer. Was this example correct?  The software tool to help automate the process of producing a blueprint for problems with a television
what is oops in java
what is oops in java  what is oops in java
what is oops in java
what is oops in java  what is oops in java
Abstraction in java - Java Interview Questions
Abstraction in java  Abstraction in java - I know its a very basic question that i can find anywhere else as well... but i am looking for a description as well as an example on Abstraction in java. can anyone
Java abstraction - Java Beginners
Java abstraction  Is abstraction and abstract class are related ar same
encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction
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... is an example to understand the concept of encapsulation. EncapsulationExample.java
 

 

 

DMCA.com