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 |
What is an object?s lock? Give name of object?s that have locks?
when to for abstract class and when to go for interface
Can we have any other return type than void for main method?
What is java developer skills?
How to obtain a performance profile of java program
Differentiate between a constructor and a method? Can we mark constructors final?
What is the purpose of setAutoCommit() ?
Is java 11 paid version?
Why are constructors used?
What are the advantages of packages in java?
What is the difference between abstract class and interface?
Does java support Operator Overloading?