aspose file tools
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


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "HAS-A relationship" Watch "HAS-A relationship" New topic
Author

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?



cheers
A
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.

Thanks,
Ankit


OCPJP 6 (91%)
 
Consider Paul's rocket mass heater.
 
subject: HAS-A relationship
 
It's not a secret anymore!