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

When should I use abstract classes and when should I use
interfaces?

Answer Posted / ved.b.tripathi

Interface : when you about to maintain the standard through
out the application then,blindly go with the interface.

Abstract : when you customize the behavior but still want to
maintain some standard then use abstract,because in abstract
you can have non abstract method that will be use by every
class that extend this abstract method and that class also
have to give the body of abstract methods(standard).

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain thread life cycle in java?

989


What is meant by javabeans?

1042


What is the function of character?

1021


Can an interface extend a class?

942


What are design patterns and please explain?

1048


Can we write multiple catch blocks under single try block?

1053


What is javac_g?

981


Can we return null in java?

1089


What is native code?

1044


What is java lang string?

955


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

988


Why should I use abstract class?

1041


Where are register variables stored?

980


What is break and continue statement?

1047


What is the purpose of file class?

983