explain how many oops concepts available in java with realtime
scenarios?
Answer / sakthi k
Encapsulation
Wrapping up of data and member function
together. Eg: Capsule is the good example for encapsulation.
Polymorphism
Ability of an object to take more than one form.
Poly-Many, Mor-Shape. For Eg: Anniyan film .
Compile time polymorphism otherwise known as
Static polymorphism.
Runtime polymorphism otherwise known as Dynamic
polymorphism.
Abstraction:
Represents the information without including the
background details.
For Eg: ATM Machine . .It provides the results
without including the background transaction.
Inheritance:
The process of acquiring base class property is
known as Inheritance.
Types
*Single inheritance
*Multiple inheritance
*Multi level inheritance: Eg:grand father-
father-son relationship.
*Hierachical inheritance
*Hybrid inheritance
Object:
Real time entity(attributes). Collection of its
own property.
Everything in the world is considered as real
objects.
| Is This Answer Correct ? | 25 Yes | 2 No |
Difference between Primary key and unique key?
What is the difference between public, private, protected, and friend access?
What is the difference between class forname and new?
what is meant wrapper classes?
What are File and RandomAccessFile classes?
What is static method with example?
How is string immutable in java?
what is difference between type 4 driver and type 1 driver?
2 Answers CMC, CTS, IBM, JK Technosoft, Napier Healthcare,
How do you make an arraylist empty in java?
How do you avoid global variables?
Where is const variable stored?
Can we have this () and super () together?