Computer Science, asked by sharank2005811, 4 months ago

explain oop concepts
abstraction

Answers

Answered by shashendra
1

Answer:

OOP concepts in Java are the main ideas behind Java's Object Oriented Programming. They are an abstraction, encapsulation, inheritance, and polymorphism. Grasping them is key to understanding how Java works

Answered by sahusameer473
0

Answer:

Abstraction refers to providing only the essential information of the data and hiding all the internal details.

Explanation:

Abstraction means displaying only the necessary and hiding all the details.

Driving a car can be taken as an example of abstraction. We only need to know how to drive the car and not all the internal processes going inside the car.

Using class we group the data and methods. These can be accessed to the outside using an access specifier. Access specifiers set restrictions on the class members. Such as

  • Members that are declared public in the class can be accessed anywhere in the program.
  • Members that are declared private in the class can only be accessed by a member function inside the class.
  • Members that are declared protected in the class can only be accessed outside the class using a friend function.

Abstraction is also implemented with the help of header files.

Example - In the math.h header file we get the function sqrt() which finds out the square root of a number but doesn't show what processes are going within it.

Abstraction helps the user to avoid writing low-level code , increases reusability of the code, and also decreases the duplicity of code.

Click here to know more about "Pillar of oops":

https://brainly.in/question/40607495

Click here to know more about "data abstraction":

https://brainly.in/question/8556350

Similar questions