Abstraction

Q. Elaborate the concept of Data abstraction.  

Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight, cost and methods that operate on these attributes. They encapsulate all the essential properties of the objects that are to be created. Abstraction is one of the most important features of OOPS.

 

Example

Class student
{
public int roll;
public char name[100];
private fees;

public void student()
{
System.out.println("First Class ");
}
}
public class example
{
public static void main(String args[])
{
student obj = new student ();
obj.student();
System.out.println("The First Program");
}
}

 

 

Leave Comment

Important Topics

Title
Java Question B 1
OOPS
Encapsulation
Abstraction
Inheritance
Polymorphism
JVM JRE