title: Bad Operand Types for Binary Operator ">"?
body: <p>I am writing a BST Program. I get the error: </p>
  
  <p>"Bad Operand Types for Binary Operator ">"</p>
  
  <p>first type: java.lang.Object</p>
  
  <p>second type: java.lang.Object" </p>
  
  <p>This is the method where it gives me the error:</p>
  
  <pre><code>public void placeNodeInTree(TreeNode current, TreeNode t)                                                                    
  {   
      if(current == null)
          current = t;
      else{
         if(current.getValue() &gt; t.getValue()) 
              current.setRight(t);
         if(current.getValue() &lt; t.getValue()) 
              current.setLeft(t);  
          }
  }
  </code></pre>
  
  <p>getValue() has a return type of Object, thus the java.lang.Object types. This is the first time I have ever seen this error. Can anyone give me some background on this error? Thanks </p>