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 / manasa

Abstract means 4 which we cant give a concrete definition
for ex wtz d def for animal v cant give so v say animal as
abstract.
Interface came into existence to facilitate multiple
inheritance
Eg for abstract: animal is a abstract class and it contains
both abstract n non-abstract methods
But remember a non abstract class cannot contain abstract
methods
Suppose consider area as method and it is different for
diff shapes like circle,rectangle,square.... here area vil
b calculated for all d shapes bt their implementation is
diff n instead of callin dat area method again n again v
vil declare it once
Now lets move on to interface
for eg if we give a compliment to girl dat she sings like
lata mangeshkar n here both dat girl n lata are connected
together by a sing method n these both r two unrelated
things and in this case we use interface.....
thank u guys have a nice tym.....

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 0 mean in boolean?

965


What is the difference between JDBC 1.0 and JDBC 2.0?

3161


How do you convert boolean to boolean?

1135


Give some features of interface?

1048


Can main() method in java can return any data?

1160


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

1118


What is the escape character in java?

962


What are the actions that can occur when a thread enters blocked state?

1046


Why main method is static in java?

1154


How an object is serialized in java?

972


What are different types of states exist for a thread?

998


What is the technique adopted to create an immutable class?

1091


What is the purpose of javac exe?

1080


what is synchronization? : Java thread

1002


what is the final keyword denotes in java?

1072