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

IN java collections we have both interfaces and classes.
instead of using interfaces why we can't use classes only
like that why we can't use interfaces only. why we need two
things interface and class.

Answer Posted / easwar

Java doesn't support multiple inheritance.We achieve
multiple inheritance using interface concept.A class can
have only one super class and number of interface.And more
over interface has only abstract methods. We need a sub
class to implement it.We cannot create an object for an
interface. So we cannot use only the classes or only the
interfaces in java.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are constructors methods?

961


What are the super most classes for all the streams?

2428


What is jvm? How its run?

1030


Why is stringbuffer thread safe?

1011


How can constructor chaining be done using this keyword?

1220


How is tree Mirroring implemented?

1011


What is the difference between an inner class and a sub-class?

949


Name four container classes.

935


What are the types of web technologies?

1005


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2773


Why we cannot override static method?

997


What is the difference between iterator and enumeration ?

966


what are the states associated in the thread? : Java thread

1003


Define immutable object?

1012


Can we able to pass objects as an arguments in java?

975