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

Which is bigger float or double java?

983


Why wait and notify methods are declared in object class?

1042


How we create object in copy constructor?

1128


What is exception handling in java?

1042


What is constructor chaining in java?

1069


Can we increase array size dynamically in java?

954


Explain the purpose of garbage collection in Java?

1033


Why are generics used?

978


What is the static field modifier?

1132


How to reverse a string in java?

1084


How to remove the trailing spaces from a string?

1276


What is a treemap in java?

1014


How many ways can we create singleton class?

973


What is fail first in java?

1209


What is substring 1 in java?

1167