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

Is java a compiler?

916


When is the arraystoreexception thrown?

959


What is the difference between a static and a non-static inner class in java programming?

977


What sorting algorithm does javascript use?

933


Differentiate between vector and array list.

993


How do you differentiate abstract class from interface?

912


What exactly is a .class file?

981


What do you understand by an io stream?

980


Explain the difference between jvm and jre?

974


Can a class be a super class and a sub-class at the same time? Give example.

1444


Are primitives objects?

997


why Interface used?

941


What is the use of private static?

1000


What is the exception hierarchy in java?

907


How many ways can we create singleton class?

914