This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interfaces

 
Vanitha Sugumaran
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Why do we need interfaces? Anyway, the class which implements an interface has to declare the methods again.
Vanitha
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Standardization of methods across multiple classes that perform the similar functions. JDBC and JMS are excellent examples of why interfaces are so important.
This topic has been discussed here many times... try the search facility. Or go to http://www.bruceeckel.com and read the chapter on abstract classes and interfaces in "Thinking in Java".
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this: http://www.javaranch.com/ubb/Forum34/HTML/000791.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic