• Post Reply Bookmark Topic Watch Topic
  • New Topic

Interface in a Project  RSS feed

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

I know some thing about interface that is, an interface is a class which has just a set of method prototypes.

As a defination it is ok.

But i want to know some thing like WHY we use interfaces in a project.

please explain in brief.

Waiting for replay.

Thanks,
Krishna
 
author & internet detective
Marshal
Posts: 37518
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Krishna Tota:
But i want to know some thing like WHY we use interfaces in a project.

When you want to decouple a class from the classes it references. If I use an interface, I can change the implementation class more easily.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!