Glad I could help, I hope...
If you are new to Java, I would take some time to master Double Linked Lists to the point where you can set up a Search Tree.
Hint:
Code:
public class Node
{
private Node leftNode;
private Node rightNode;
private int/char/String data;
}
Understanding this is important, especially later as multiple classes are accessing the same object. You don't want to accidentally change the data of the object in one class and expect it to have remained constant in a different one. I have seen many people mess this up.
For Example:
Code:
private Node node1 = new Node(SomeData);
private Node node2 = node1;
Now node1 and node2 are pointing to the same space in memory. Now if a change is made to the data in one the data changes in both.
Code:
node2.setData(NewData);
node1.toString(); //Revels NewData , SomeData is lost forever