what are the oops concept in java explain with real time
examples
Answer Posted / pranav
OOps concepts are classified into 4 types. They are
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism.
1. Abstraction:-
Hiding of non essential data and retrieving only the required data is known as Abstraction.
Eg:- Online Transactions.
2. Encapsulation:-
Wrapping up of memberdata and member functions bound together is known as encapsulation.
Eg:- Assembling of a computer system.
3. Inheritance:-
Acquiring the properties of one class by another class is known as encapsulation.
Eg:- Shoping Malls
4. Polymorphism:-
The process of acquiring many forms by one form is known as polymorphism.
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Difference between Linked list and Queue?
Can an interface be defined inside a class?
Why do we need data structure in java?
What are the two main uses of volatile in Java?
What is the difference between jdk, jre, and jvm?
How do you use compareto?
What is the meaning of variable in research?
What is the purpose of the file class in java programming?
What are different access specifiers in java? Explain
What is mnemonic code?
What is a blocking method in Java?
How do you use nextline in java?
Does unicode support all languages?
What is assembly used for?
How do you ensure that n threads can access n resources without deadlock?