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...

Can you explain the difference b/n abtract and interface
with a good example,?In what cases we have use abtract and
what case interface?

Answer Posted / nt.jayan

Interface contains final variable and method signatures
only. All of this method and variable are should be public.
In Technically interface like Pure Abstract class.

Abstract class contains both abstract method also may having
some method defination. When we want to use some of the
functionality in abstract we use Abstract class.

Also, By using Interface we achieve multiple inheritence
using Implements. When we use Abstract class we can extends
only.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is arraylist class in java?

1059


Why multiple inheritance is not supported by java?

979


What is the name of the java compiler?

1053


What is a private class in java?

1050


How to handle a web browser resize operation?

1073


How do you compare characters in java?

987


Why is the singleton pattern considered to be an anti pattern?

884


What are the important methods of java exception class?

1119


What are the skills required for core java?

1014


What do you mean by platform independence?

1049


Objects or references which of them gets garbage collected?

964


Can a class extend more than one class?

1120


What is jar?

1120


What is considered an anti pattern?

930


What is try-with-resources in java?

1168