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 we will use an Interface and Abstract class?

Answer Posted / manoshp

Abstract class:- When there are common behaviors for a set of classes and that behavior do not have any existence by its own, these behaviors are defined in an abstract super class. All sub classes will inherit that common behavior by extending the super class.

Interface:- When there are multiple implementations for a set of functionalities, all these behaviors are defined in an interface as entry points without any implementation details to these behaviors. The client class can use this interface without considering the implementation details.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where is stringbuffer stored?

964


What are heterogeneous objects?

1017


What is the purpose of finalization in java programming?

1017


When arithmeticexception is thrown?

1009


What happens if an exception is not handled in a program?

1082


What are mutable classes?

1017


How can the checkbox class be used to create a radio button?

1020


What is stringbuffer in java?

1044


Difference between object and reference?

1150


What is a generic code?

1029


Does chrome use java?

942


What are the basics of core java?

999


Can we convert stringbuilder to string in java?

964


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

937


What all access modifiers are allowed for top class ?

1172