Passing an object as a an attribute for another...

basically I am trying to make a link object that I create as an attribute of another object (node) ..how do i do that...as in ,object node has 3 links attached to it ,a link has values ,source node...etc...thanks
[233 byte] By [ayman697a] at [2007-11-26 15:53:09]
# 1

It's simpler than you think:

public class Link {

// put whatever a link needs in your application here

}

Note however that if all you want are references to other objects, you might not need a separate link class to encapsulate it. (Or, maybe you do; it depends.)

You might also want to look at the java.lang.ref package to see if it does anything you need. It may or may not.

paulcwa at 2007-7-8 22:13:35 > top of Java-index,Java Essentials,Java Programming...