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 / brijendra kumar soni(xavient)

1-By using Interface we can achieve the Multiple
inheritence while by using abstract class we can not
achieve.

2-Abstract Class extended by a class only while Interface
implmented by a class and extended to one or more
interfaces.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can an interface extend a class?

933


Can we have return statement in finally clause? What will happen?

924


Can we create an object of static class in java?

981


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

965


How to convert string to char and vice versa?

965


How do you check if a character in a string is a digit or letter?

1023


Is alive in java?

903


Why char array is favored over string for the storage of passwords?

1017


What is the default value of float and double datatype in java?

966


What is protected in java?

957


What are exception handling keywords in java?

987


What is set and get methods in java?

936


What is a values collection view ?

1038


Can inner class be public in java?

989


What is the common usage of serialization? What exceptions occur during serialization?

1064