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 / shaik baji

Interface in the sence a generic templet that means it will
define a generic functionalities of a group.
For Ex:- We can say "Car" as an interface

1)let's asume if you want a List interface functionalities
the your class should implements the List interface, that
means you should implement all the methods which are
available in List interface even you are not using all the
methods so that the Java developers designed the classes
which are implements the java.util interfaces.

Now if you want any interface functionalities then you just
create an object of that related java.utill package class
and call the methods by using the object.

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

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you declare an interface method static?

1022


What is the purpose of the System class?

970


Explain about the dynamic behavior of core java?

1084


Why do we need data serialization?

946


How do you clear a method in java?

977


What is preparedstatement in java?

1009


What is native code?

1050


What are 4 pillers of object orinted programming?

967


What is the requirement of thread in java?

1011


What are the advantages of assembly language?

892


What are abstract classes and anonymous classes?

1042


what is singleton class in java?

1016


How can you read an integer value from the keyword when the application is runtime in java? example?

1081


How hashset works internally in java?

1033


Why is String immutable?

1026