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

Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

996


What do you mean by an object in java?

1077


In how many ways we can do synchronization in java?

916


Can a class have multiple superclasses?

1076


Write code of any action class?

951


Is char a data type in java?

918


Explain the pointers in Java?

991


What are voids?

917


What are the 3 types of loops in java?

987


What is the difference between the paint() and repaint() methods?

1009


Is java a utf 8 string?

930


What are the two ways of implementing multi-threading in java?

1418


What is use of inner class in java?

1036


What is a line break?

971


What is this keyword in java?

982