This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Interface Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Interface Question" Watch "Interface Question" New topic

Interface Question

Michael Eller
Ranch Hand

Joined: Feb 28, 2004
Posts: 32

I have studying the use of interfaces. I believe I am getting a good grasp of the subject.
I do have one question.
Is it safe to say that an interface provides the methods that an object that implements that interface uses as a means of communication with other objects? ... hence the name interface.

Thanks for any and all assistance.

Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Correct. There may or may not be logical/direct relationship between those objects. That's what a loose coupling means.
But be clear with the use of Interface and Abstract Class.
Consider Paul's rocket mass heater.
subject: Interface Question