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

How do you check if a string is lexicographically in java?

914


What is the use of toarray () in java?

1024


How to compare strings in java?

932


What is comparable and comparator interface? List their differences

1043


What is run time allocation?

979


What are some characteristics of interference class?

957


What is the default execution method in java?

1143


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

940


What is array length in java?

922


Difference between final and effectively final ? Why is effectively final even required ?

941


Discuss different types of errors that generally occur while programming.

990


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

1004


List the different types of classloaders in java.

934


Define an abstract class with reference to java.

953


What are the advantages of arraylist over arrays?

1047