Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / suresh

oops concepts are mainly 3
1.encapsulation
2.inheritance
3.polymorphism

1 :- encapsulation refers to binding the data in a single
class the data present inside the encapsulation is secured.

abstraction comes under encapsulaton.

real time example:-if you get fever you will take the
medicine to cure.the medicine is the capsule in which the
powder is present.the powder is a mixture of several
chemicals as in the same way all the classes are mixed and
only the output(object) you will see as if a capsule.

2 :- inheritance is nothing but extending the class from
parent to the child

real time example:- the prime minister of india
(late)mr.jawaharlal nehru and his daughter indira gandhi
and her son rajiv gandhi and his wife sonia gandhi.

3 :- polymorphism refers to which it does many things

real time example:- consider the electric power which does
many things .

Is This Answer Correct ?    28 Yes 49 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are local variables?

999


What are the advantages of passing this into a method instead of the current class object itself?

1617


What is early binding and late binding in java?

1099


What does isempty () do in java?

1000


What is a marker interface?

1087


Differentiate between postfix and prefix operators in java.

1078


Explain the difference between map and flatmap stream operation?

1197


If I only change the return type, does the method become overloaded?

874


What are the types of relation?

993


Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

996


Why is java so important?

1064


What are the steps involved to write rmi based programs?

950


Give me example of derived data types.

1086


Can I override protected method in java?

1018


What is data string?

882