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

Which is faster call by value or call by reference?

988


Can we access instance variables within static methods ?

1156


What is an example of a boolean?

1117


Can we restart a thread already started in java?

1147


What is oop principle in java?

1265


What is basic syntax?

1111


What do you mean by light weight and heavy weight components?

1067


What is array length?

1019


What is starvation?

1411


Why do we use bufferedreader?

1052


How do you execute a thread in java?

997


Can we create our own daemon thread?

1031


What are the rules for variable declaration?

1013


What is a parent class in java?

1060


Why string is called as immutable?

1010