SCJP Certification

Sun Certified Java Programmer Certification exam essentials

September 30th, 2011

What is association?

Java Facts, by Daisy Williams.

An association represents a relationship between classes. It represents a mechanism that allows objects to communicate with each other. It describes the connection between different classes.

Association can be unidirectional or bi-directional.

A unidirectional association implies that an object of the class from which the arrow is originating, i.e., the class that has the no-arrowhead side of the association may invoke methods on the class towards which the arrow is pointing.

A bi-directional association means that either object in the association may invoke methods on the other.

Share

Back Top

Responses to “What is association?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*