I'm receiving a "can not resolve symbol "left/right" " within my code and i do not fully understand why. I have looked at other examples and posts but am just not fully understanding what i need to do to fix my error. i will post the sections of my code that are relevant to the issue. Any help with this would be greatly appreciated. Thank you. **( i apologize if the appearance is a bit off. the spacing seems to be a little off when i cut and pasted it in)
public class SBST <Value>
{
private class Node
{
private Node left;
private Node right;
private String key;
private Value value;
public Node(Node left,Node right, String key, Value value)
{
this.left = left;
this.right = right;
this.key = key;
this.value = value;
}
}
private Node root;
private int size;
private String [] keys;
private Value [] values;
private int currentSize;
private Random rand = new Random();
public SBST (int size)
{
if (size < 0)
{
throw new IllegalArgumentException();
}
else
{
this.size = size;
this.keys = new String[size];
this.values = new Value[size];
this.currentSize = 0;
}
}
public int height(String keys)
{
if (keys == null)
{
return 0;
}
else
{
int l = height(keys.left);
int r = height(keys.right);
if (l > r )
{
return l +1;
}
else
{
return r + 1;
}
}
}