title: Operator '>' cannot be applied to 'android.widget.EditText','int'
body: <p>I'm doing an app for Android that will generate a random number between 1 and 10,000 and compare it to an EditText inputType:number and then in a TextView tell if it is bigger or smaller.</p>
  
  <p>But when I try to make it, android studio returns an error</p>
  
  <blockquote>
    <p>Operator '>' cannot be applied to 'android.widget.EditText','int'</p>
  </blockquote>
  
  <p>Here's the code:</p>
  
  <pre><code>package com.boodle.guessthenumber;
  
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.EditText;
  import android.widget.TextView;
  
  
  public class MainActivity extends ActionBarActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.layout_main);
     }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
          public void guess (View view){
  
          EditText textguess = (EditText) findViewById ( R.id.textguess );
  
          TextView result = (TextView) findViewById(R.id.resulto);
  
          int rand = (int) (Math.random()*10000+1);
  
          if (textguess &gt; rand) {
              result.setText(textguess.getText() + "is too big" );
              }
  
          if (textguess &lt; rand) {
              result.setText(textguess.getText() + "is too small" );
              }
  
          }
  </code></pre>