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

what is difference between abstract and interface?
can i give real time example for the two topics?

Answer Posted / tharun raj s

an abstract class contains 1)instance variables 2)concrete
methods(implemented methods). 3)abstract
methods(unimplemented methods)
An interface contains 1)abstract methods and variables which
are public static and final by default

Abstract class is written when there are certain common
features shared by all the objects
Interface is written when all the features are implemented
differently in different objects

when an abstract class is written it is the duty of the
programmer to provide subclasses to it.
An interface is written when the programmer wants to leave
the implementation to the third party vendors

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the collections api?

988


what is the difference between yielding and sleeping? : Java thread

906


What is data type in computer?

917


Which api is provided by java for operations on set of objects?

1396


Which are the two subclasses under exception class?

1001


Which list does not allow duplicates in java?

873


What does pointer mean?

975


What are the four versions of java?

964


What is lifetime variable?

909


Explain JMS in detail.

971


Explain how hashmap works?

1004


What is the java virtual machine?

1015


Is an object null?

908


How hashset works internally in java?

1013


Is java call by value?

1024