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 to use abstract class and when to use interface?

Answer Posted / jc

If you want give different implementation(behaviour) to
methods which are available in the interface go for
interface.
If you want give different implementation to particular
methods(that is only some methods which are not similar to
subclass)go for abstract class.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define an applet in java?

1230


Describe method overriding

1178


Difference between start() and run() method of thread class?

1114


Differentiate between stringbuffer and string?

1077


How do you get length in java?

1088


What are the 8 primitive data types in java?

1084


What is serialization in java?

1110


What is difference between fail-fast and fail-safe?

1283


What is public/private protected in java?

1086


What is math floor in java?

994


What is the static method?

1124


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

1145


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

991


How many characters is 2 bytes?

1039


What is return used for in java?

1069