View Single Post
Old Jan 30th, 2008, 12:10 AM   #2
armandino
.
 
Join Date: Jan 2008
Posts: 2
Rep Power: 0 armandino is on a distinguished road
Re: Using Association in Java

Quote:
Originally Posted by namsu View Post
I have only really used inheritance and composition in Java. Can someone provide me with an example on association. I want to try and make the program function the same way except by association. For inheritance I am obviously using the keyword extends and using the super keyword to call to the parent class. Thanks.
You have actually used associations more often than inheritance or compostion. An association is usually described as a "uses" relationship, that is when one object uses (invokes a method on) another object.
armandino is offline   Reply With Quote