ok, I've been trying to make a java program for a high school project. The project is making a Binary Tree class. Now I'm not sure if I'm just writing it all weird but I can add a root node [which would be the top of the tree]. I have a temp variable take the place of either the left subnode or the right subnode depending on if the thing you are adding is less than or greater than. Now everything works up to this one part. I modify t, which it my temp variable, but it doesn't modify that Object it was set = to. Now I am led to believe that all things in Java are byRef and not byVal. Is there a way to fix this? If you need to actually see the code, post so. All of my other classes work, I hope since the teacher wrote most of them.
01-23-2004, 01:48 AM
You should probably post the code you are talking about. Need to see the order you do things in etc.