Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


what are the oops concept in java explain with real time
examples

Answers were Sorted based on User's Feedback



what are the oops concept in java explain with real time examples..

Answer / madhu

OOPS Concepts are mainly 4
1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphisam
Abstraction:-Hidding non-essential features and showing the
essential features

(or)
Hidding unnecessary data from the users details,is called
abstraction.
Real Time example:Any electronic Device

in that we don't see the
button circuits.i.e buttons circutes and wirings all are
hidden.so i think its good example.

Encapsulation:

Writing Operations and methods stored in a single
class.This is Called Encapsulation

Real Time Example:A state Or Country
i.e different culture districts make a state.and different behaviours of states form a country..
I think it is good example

Inheritance:
The New Class is Existing from Old Class,i.e SubClass is
Existing from Super Class.

Real Time Example:

Father and Son Relationship is the Ever green example

Polymorphisam:

Sinle Form behaving diffreantly in diffreant
Situations.
Example:-
Camera Mobile
when we talk used as communicator,
When we go for a tour used as a camera.
When we want to enjoy used as a player or FM.

I think these all are real time experianceany.is there any
more answers send me my mail Madhu.jjj@rediffmail.com also.

Is This Answer Correct ?    9 Yes 2 No

what are the oops concept in java explain with real time examples..

Answer / ajay kumar agarwal

OOPS Concepts are mainly 4
1.Abstraction
2.Encapsulation
3.Inheritance
4.Polymorphisam
Abstraction:-Hidding non-essential features and showing the
essential features

(or)
Hidding unnecessary data from the users details,is called
abstraction.
Real Time example:Any electronic Device

in that we don't see the
button circuits.i.e buttons circutes and wirings all are
hidden.so i think its good example.

Encapsulation:

Writing Operations and methods stored in a single
class.This is Called Encapsulation

Real Time Example:A state Or Country
i.e different culture districts make a state.and different
behaviours of states form a country..
I think it is good example

Inheritance:
The New Class is Existing from Old Class,i.e SubClass is
Existing from Super Class.

Real Time Example:

Father and Son Relationship is the Ever green example

Polymorphisam:

Sinle Form behaving diffreantly in diffreant
Situations.
Example:-
Camera Mobile
when we talk used as communicator,
When we go for a tour used as a camera.
When we want to enjoy used as a player or FM.

I think these all are real time experianceany.is there any
more answers send me my mail Madhu.jjj@rediffmail.com also.

Is This Answer Correct ?    4 Yes 1 No

what are the oops concept in java explain with real time examples..

Answer / venkysam

inheritance: deriving the properties of superclass by using
EXTEND method
polymorphism:poly=many form, a function with same name but
different parameters and type will change
abstraction:showing essential features by hiding non essential
features,by using access specifiers
PUBLIC,PRIVATE,PROTECTED
encapsulation: combination of data members and member
functions is called , data encapsulation

Is This Answer Correct ?    4 Yes 2 No

what are the oops concept in java explain with real time examples..

Answer / shakti mishra

ABSTRACTION
ENCAPSULATION
POLYMORPHISM
INHERITANCE
these 4 are the OOPS concept in java.
ABSTRACTION:means hiding the irrelevant information from the
user.
EXAMPLE:a user of mobile phone in not interested with the
circuitry involved it is irrelevant to the user of mobile
but he is only interested to know how to call a person,how
to send the message etc.thus the circuitry is hided from
the user.
ENCAPSULATION:means wrapping of data and method into a
single unit so that no one can misuse it and safe the date
from outside interface.
EX;MEDICAL CAPSULE
means the medicine is wall encapsulated with the outside
layer so that no one can it keeps the medicine safe from the
outer interface.
INHERITANCE:means object of a class acquire the property of
the object of another class.it provide reusability means if
we want to add more feature then instead of modifying the
class we have just to extend the class into subclass.
EXAMPLE:suppose a bird robin belongs to the class of flying
bird but flying bird also belong to the class bird.
so bird robin inherit the property of both.
POLYMORPHISM :means taking more than one form
EXAMPLE:Person in Home act is husband/son,
in Office acts Employer.
in Public Good Citizen.
hopefully i m able to solve your problem.THANX

Is This Answer Correct ?    3 Yes 1 No

what are the oops concept in java explain with real time examples..

Answer / madhu

abstraction hiding the information ..
e.g light switch when switch a button light is ON but we dont know how the light is on i.e. hiding the information

Is This Answer Correct ?    1 Yes 0 No

what are the oops concept in java explain with real time examples..

Answer / madhu

polymorphism means just divide the word poly means many so performing multiple task with single name ..
e.g person or human being

Is This Answer Correct ?    1 Yes 1 No

what are the oops concept in java explain with real time examples..

Answer / magesh

We have the following oops concepts like
1.Abtsrction
2.Encapsulation
3.Inheritance
4.Polymorphism

Abstraction:

hiding unnecessary data from the users and making the
application as user friendly then it is called as
abstrcation

ex:Any mail account the user is simply filling the form and
he don't know how it is developed.

Encapsulation:

Wrapping the data and code as a single unit is called as
encapsulation.

ex:Capsule is the best real time example for it.In it we
will have two types of drugs combined as single capsule.

Inheritance :
Acquiring the properties from one class(base class or parent
class)to another class(derived class or child class)is
called as inheritance.

Ex:Inventing laptop from desktop.

Polymorphism:

Single entity behaving in different forms is called as
polymorphism

ex:Mouse is for click the buttons and dragging the bars or
placing the pointer in a particular place

Is This Answer Correct ?    0 Yes 0 No

what are the oops concept in java explain with real time examples..

Answer / 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

what are the oops concept in java explain with real time examples..

Answer / nagur dethri

in java there are four main concepts which are back_bone to
java,they are.
ABSTRACTION,
ENCAPSULATION,
INHERITANCE,
POLYMORPHISM.
ABSTRACTION:Simply,abstraction means showing
essentialthings and hiding non_essential or un_neccessary
things.
Eg:many people want to drive different types of cars with
variety styles.here,we are hiding the inner side design
(i.eengine battery,sound system wirings etc.,i.e
non_essential)but we are showing (sound system,remote
system to operate those systems).
ENCAPSULATION:combing of both data and methods.
eg:simply in java language,in an single class we are using
or combing both instance variables and methods.
POLYMORPHISM:it is an ability to take more than one form.
eg:STUDENT,a student is acting like a student in college
camplus,and also acting as an employee in part time job and
acting as an daughter/son in homes.
INHERITANCE:in java,deriving a new class from an old class
(i.e,already existing one) or simply new or derived or
super class acquiring the properties of old class or base
or sub class.
eg:as_usual,CHILD AND PARENT RELATIONSHIP i.e,jeans
(daughter or son getting the fetures of his/her parents).

THANK YOU.

Is This Answer Correct ?    2 Yes 3 No

what are the oops concept in java explain with real time examples..

Answer / madhu

Inheritance defining a new class by using the member of existing class..e.g main class vehicle
sub classes can extend vehicle like car,bike,auto cos car, bike ,auto are belongs to vehicle so they can extend using vehicle..

Is This Answer Correct ?    0 Yes 1 No

Post New Answer



More Core Java Interview Questions

class A { class B { psvm(String args[]) { } } } if the prg saved in A.java whats the o/p?

7 Answers   HCL, TCS,


what is main difference b/w abstract class and interface

4 Answers  


I have 100 records in a table with two rows. I need to display 10 records per page like Google Search. I need only the Logic(Pagination) in Pure Java. No JSP and all..Thanks in Advance...

2 Answers   Cybernet,


What is the exact difference in between Unicast and Multicast object?

0 Answers  


What is the difference between stream and buffer?

0 Answers  






How to sort a collection of custom Objects in Java?

0 Answers  


What is a jit compiler?

0 Answers  


Is JRE required to compile Java files ?

4 Answers   HCL,


What is anti pattern in programming?

0 Answers  


What are keywords in java?

0 Answers  


when,where and how to use abstract class and interface

2 Answers  


What is dynamic dispatch in java?

4 Answers  






Categories