title: Java android studio get number from EditText
body: <p>I have a EditText that is set to number but am not sure how to get the value entered into the main.activity.java. Please help. I also want it to be a number integer not string so that I can perform operations with it. Thanks.</p>
  
  <p>I know that this is how to do it for a string but not sure how to do it for an integer/number.</p>
  
  <pre><code> waketimeEnter = (EditText) findViewById(R.id.waketime_enter);
  
   public void buttonClick(View view) {
  
      String waketime = String.valueOf(waketimeEnter.getText());
      sleepNumber.setText(waketime);
  
  
  }
  </code></pre>