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...

explain oops concepts with examples?

Answer Posted / sunil

oops....its a object oriented concept....
this concept is used in different language for reducing line
of code,complexity..
oops having 4 important pillar.
1)Abstraction:
*Hide unnecessary data and show only important think.
*we can create method of abstract class if method is
Abstract method.
2)Encapsulation:
* Binding data and provide security.
ex..
create
class A
{

}

class A binding all methods,variable etc..
and provide security.

3)Polymorphism
same think but behave differently..
Same method name but different parameter...
ex..Method A(int a,int b)//A method name and 2 parameter.
{
}
Method A(int a,int b,int c)//A method name and 3 parameter.
{
}
4)Inheritance
Ability to create new class from existing class...
*inheritance variable,method from existing class
ex..
class A
{
int a,b,c;
}
class B:A
{

}
so we dont need to declare these variable again class B bcoz
these variable inherit from existing class .

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a concrete classes? Is Java object class is concrete class?

972


What happens to a static var that is defined within a method of a class?

1027


How do I get a substring?

968


What are computer functions?

943


How are destructors defined in java?

1029


Why use string handling in Java?

1026


Should you use singleton pattern?

934


In how many ways we can do exception handling in java?

991


What is defined as false sharing in the context of multithreading?

1040


What is the difference between class & structure?

1213


How can you share data between two thread in Java?

934


What is this () in java?

1018


From the two, which would be easier to write: synchronization code for ten threads or two threads?

1051


What are the concepts of 'OOPS'?

1066


How do you break a loop?

977