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

How do you reverse a string in java without using string buffer?

1038


Why put method is idempotent?

836


Explain exception chaining in java?

1083


Is set ordered in java?

941


How to compare two strings in java program?

1011


Explain the features of interfaces in java?

924


What do you understand by the term polymorphism?

998


Can memory leak in java?

980


What is an immutable class? How to create an immutable class?

997


What is fail fast in java?

1054


In which order the iterator iterates over collection?

944


Which language is java?

913


How to make a read-only class in java?

1073


Java Compiler is stored in JDK, JRE or JVM?

1468


Difference between throw and throws?

1042