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 is the difference between abstract class and interface?

Answer Posted / ranganathkini

An interface is purely contractual in that it only defines
method headers but no implementation. Classes that implement
the interface must provide implementation to all method
defined by the interface.

An abstract class contains partial implementation, i.e. it
provides implementation for some methods where as just
defines abstract method headers for other. Abstract classes
cannot be instantiated directly and have to be extended by
subclasses who implement the abstract methods defined in the
abstract superclass. Unlike an interface, subclasses of the
abstract class only need to implement only those methods
that are marked abstract.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

927


Explain the difference between string, stringbuffer and stringbuilder in java?

951


How many bytes are there?

947


What is ctrl m character?

989


What is treeset in java?

941


What is the function of http?

973


How do you sort an array in java?

931


Can a constructor call the constructor of parent class?

974


Is Java a dying language?

1036


What is the purpose of stub and skeleton?

955


Why constructor has no return type?

1054


What are the files generated after using IDL to java compiler?

1089


what is encapsulation in java? Explain

1050


What will happen if a thrown exception is not handled?

953


Why vector is used in java?

964