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

Tell me the scenario,Where we can use interfaces or
Abstract class.And What is the difference between
interfaces and abstract class?

Answer Posted / vishal

Abstract Class encapsulates shared(common) behavior and
define place holder for all subclasses
- Define shared behavior
- Can have implementation code
- Can not be instantiated
- A class can be inherited from single abstract
class—Unless language supports Multiple inheritance.
- Provide both abstract and concrete menthods
- Strict IS-A relationship.
Interface: If there is no shared behavior –each subclass
must implement all method defines in a base class this is
called as Interface
- Defines Behavior. It is a cntract and its subclass
must implement it.
- Can not be instantiated
- A class can implemet mutiple interfaces
- Provide only abstract methods
- Not a strict IS-A relationship

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i got a backdoor offer in process global,Bangalore..Can i work with it?

2850


What is ambiguity in inheritance?

1128


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

2402


What is coupling in oop?

1041


What is class encapsulation?

1109


What is overloading in oop?

1016


Why do we use class?

1101


Why is polymorphism used?

1052


What is oops with example?

1061


What is object-oriented programming? Webopedia definition

1277


Which is not an object oriented programming language?

1009


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3542


Explain the concepts involved in Object Oriented programming.

1257


What is the renewal class?

2769


What are the 5 oop principles?

1137