PDA

View Full Version : String Building Problem


redsoxfan
03-13-2007, 12:46 AM
Im having trouble building strings while implementing a BST. For whatever reason which i cant figure out the stings are being printed in what i beileve is hashcode. How can i get the string to print the "real string".

My code basically looks like this

String bob = "";

String bob += inOrderTrav(n.left);

Where inOrderTrav is a private method which returns the string value of the item in the BST which corresponds to the BSTNode n.left.

What am i missing here? Why is the string showing up as hashcode at System.out?

Thanks in advance!

redsoxfan
03-13-2007, 01:23 AM
nevermind figured it out