wood burning stoves
The moose likes Beginning Java and the fly likes what is the need of interface???????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is the need of interface????????" Watch "what is the need of interface????????" New topic

what is the need of interface????????

rahul mehra
Ranch Hand

Joined: Aug 20, 2007
Posts: 33
why is interface needed in java.... if we say that any class which implememnts a particular interface has the flexibility to define its method in its own way..then we might as well as declare a class with the required method....

why do we need to define an interface.... ???

can anybody give me the basic idea.....

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
The Sun Java Tutorial has a section on interfaces and inheritance. It explains why and when you might want to use them
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Interfaces are used to define contract,
They are also used to achieve runtime polymorphism.

[Servlet tutorial] [Servlet 3.0 Cook Book]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: what is the need of interface????????
It's not a secret anymore!