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

Why do we use class in oops?

914


• What are the desirable attributes for memory managment?

2165


What is the importance of oop?

1038


What is object in oops?

1019


How do you explain polymorphism?

1011


program for insertion ,deletion,sorting in double link list

2626


What is inheritance in simple words?

1009


Are polymorphisms mutations?

1107


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2259


Whats oop mean?

988


How can you overcome the diamond problem in inheritance?

1136


What is encapsulation in simple terms?

974


What is oops concept with example?

967


How do you achieve polymorphism?

1036


What is polymorphism programming?

1068