title: Non static method 'getText()' cannot be referenced from a static context
body: <p>I can't figure out what I've done wrong with this code for a "Higher or lower game" error below</p>
  
  <pre><code>package com.test.higherorlower;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.EditText;
  import android.widget.Toast;
  import java.util.Random;
  
  public class MainActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
  }
  
  
  
  public void guess(View view) {
  
      Random rand = new Random();
      int n = 0;
  
  
      EditText guess = (EditText) findViewById(R.id.number);
  
      int number = Integer.parseInt(EditText.getText().toString());
  
      if (number &gt; 20) {
          Toast.makeText(com.lastineindustries.higherorlower.MainActivity.this, "That number is above 20.", Toast.LENGTH_LONG).show();
      } else if (number &lt; 0) {
          Toast.makeText(com.lastineindustries.higherorlower.MainActivity.this, "That number is negative.", Toast.LENGTH_LONG).show();
      } else if (n &gt; number) {
          Toast.makeText(com.lastineindustries.higherorlower.MainActivity.this, "Higher.", Toast.LENGTH_LONG).show();
      } else if (n &lt; number) {
          Toast.makeText(com.lastineindustries.higherorlower.MainActivity.this, "Lower.", Toast.LENGTH_LONG).show();
      } else if (n = number) {
          Toast.makeText(com.lastineindustries.higherorlower.MainActivity.this, "Correct.", Toast.LENGTH_LONG).show();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>error message is in the line</p>
  
  <pre><code>int number = Integer.parseInt(EditText.getText().toString());
  </code></pre>
  
  <p>specifically in the getText part. The actual message is also the title. There is also another error in the line</p>
  
  <pre><code> } else if (n = number) {
  </code></pre>
  
  <p>apparently it wants a Boolean but got an int variable
  any help would be greatly appreciated. </p>