This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HAS-A relationship
 
Similar Threads
Enthuware: relationship is-like-a
Overriding rules... Please confirm!
Anonymous class behavior confusion !
Difference between object and instance
Inheritance question - Interfaces