File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes HAS-A relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "HAS-A relationship" Watch "HAS-A relationship" New topic

HAS-A relationship

Andy James
Ranch Hand

Joined: Aug 22, 2005
Posts: 90
Hi all,

Can classes and interfaces share HAS-A relationship? For the following code, is it correct to say that MyClass HAS-A MyInterface and MyInterface HAS-A MyClass?

Ankit Gareta
Ranch Hand

Joined: Mar 28, 2011
Posts: 67

Hi James,

I think , classes and interfaces share HAS-A relationship .
so that your mentioned scenario is perfectly true.

please, correct me if I am wrong somewhere.


OCPJP 6 (91%)
I agree. Here's the link:
subject: HAS-A relationship
jQuery in Action, 3rd edition