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 main underlying concepts of object orientation?

Answer Posted / prasi

Abstraction - Interfaces are the best examples of
abstraction .
Encapsulation - Classes are best examples of encapsulation.

Generally we encapsulate what varies &
we abstract commonalities...

One more thing, You should always subclass for behabiours..
you should never subclass for properties / attributes. If
only properties vary, then you have got to encapsulate them
in somewhere else e.g. in a class or in some collection
object like - Properties in Java / Map

Hope this helps..

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use if instanceof keyword? And how do refer to a current instance of object?

991


Can an interface implement or extend another interface?

1083


Can you tell something about GDI objects?

1034


What is a constructor in class?

1142


Explain serialization and overriding?

1127


What is the difference between an error and an exception?

1145


What are the interfaces you used in beans?

1066


Do structs support inheritance?

1012


What are the features of encapsulation ?

1031


What's the order of call of constructors in inheritiance?

1020


What is the diffrence between an abstract class and interface?

1121


What do you mean by polymorphism?

1086


How many methods are there in the serializable interface?

1005


How many methods are there in the externalizable interface?

1087


Explain about overriding polymorphism?

1122