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

Difference between abstract class and interface

Answer Posted / ratikant patra

1.*Abstract class may contain abstract methods,constru-
-ctors,concrete methods,fields....
*interface only contain signature of methods and
fields.

2. *All access specifiers are allowed to class members in
abstract class.By default scope is package or public
depends on programming.
*But data fields and method signatures bydefault final
and public.

****WE KNOW JVM TREATS FINAL METHODS AS INLINE. SO, DYNAMIC-
POLYMORPHISM THROUGH INTERFACE IS FASTER THAN OTHER.
************

3.Abstract class always a super class,only can beextended.
But interface only can be implimented.

4.Code reusability possible by extending abstract classes
*But code reusability not possible using interface.

5.Abstract class is used when programmer need to maintain
property of super class in sub classes i.e. programmer
may override complete methods(but bound to redefine
abstract methods.unless sub class becomes abstract).
*In case of classes implimenting interface must define
all the methods.

6.At a time we can extend only abstract class.
*But we can impliment many interfaces to a class.

RATIKANT PATRA,KIST,BBSR

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you Explain element .net mobile with example? : Microsoft dot net mobile

904


What is the access level of the visibility type internal?

917


Can you explain server controls in atlas?

931


Explain cache memory? : Dot net architecture

909


What is .net mobile lists. : Microsoft dot net mobile

910


What is .net mobile utility controls. : Microsoft dot net mobile

936


What happens when you try to update data in a dataset in .net while the record is already deleted in sql server as backend?

944


Differences between VS 2005, 2008 and 2010 ?

963


What are the different pipelining hazards? : Dot net architecture

970


Explain a .net mobile example with details? : Microsoft dot net mobile

838


What are end points, contract, address and bindings?

890


Explain .net mobile selectionlist control? : Microsoft dot net mobile

935


Explain difference between state server and sqlserver? : .NET Architecture

906


What is difference between .net and visual studio?

930


What is a clickonce application?

887