This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Interface dependant on class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Interface dependant on class" Watch "Interface dependant on class" New topic

Interface dependant on class

Salim Mohamed
Ranch Hand

Joined: Sep 19, 2002
Posts: 55
When can I say that an interface depends on a class ?
Dinesh Kumar
Ranch Hand

Joined: Jul 03, 2002
Posts: 54
An interface can extend another interface but I don't think it can extend a class so it can't depend on a class.
Tina Coleman
Ranch Hand

Joined: Dec 12, 2001
Posts: 150
From 'UML Distilled':
'A dependency exists between two elements if changes to the definition of one element may cause changes to the other.'
So, if an interface uses a class (rather than an interface) as a parameter or as a return, then the interface would be dependent upon the class.
Consider Paul's rocket mass heater.
subject: Interface dependant on class
Similar Threads
does an abstract method require an abstract class?
Class or interface
Regarding Interfaces