• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the need of interface?  RSS feed

 
aryan sahu
Greenhorn
Posts: 11
Chrome Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain why we need interface and how does it helps in late binding! I want to know the exact reason besides the points it helps in multiple inheritance and all..
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interface play important role in polymorphism! for example:

the list can be ArrayList,LinkedList etc... Plus interface can be used to get some information about a class example, MarkerInterface
 
Miku Ranjan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As the last post explain interface help for polymorphisim and your application can be more manageable for future ,multiple inheritance can be achieved,
can use interface reference to create implement class object.

 
Mike Okri
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A similar question was asked a while back - interface
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!