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 / srikanth reddy

1. Abstract classes may have some executable methods and
methods left unimplemented. Interfaces contain no
implementation code.
2. An class can implement any number of interfaces, but
subclass at most one abstract class.
3. An abstract class can have nonabstract methods. All
methods of an interface are
abstract.
4. An abstract class can have instance variables. An
interface cannot.
5. An abstract class can define constructor. An interface
cannot.
6. An abstract class can have any visibility: public,
protected, private or none
(package). An interface's visibility must be public or none
(package).
7. An abstract class inherits from Object and includes
methods such as clone() and
equals().

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by distributed application? Why are we using that in our application?

916


Explain about the security aspect of java?

931


This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }

951


How many bytes is a string in java?

949


How do I stop concurrentmodificationexception?

981


What is the difference between public, private, protected, and friend access?

1004


What is thread pool? How can we create thread pool in java?

1023


Is void a return type?

915


What methodology can be employed to locate substrings inside a string?

914


What is final access modifier in java?

1080


How big is a 32 bit integer?

1000


What is java and their uses?

977


What’s a deadlock?

1057


Explain jdk, jre and jvm?

927


List some java keywords sun like c, c + + keywords?

973