title: why editText make program stopped if didn't input anything
body: <p>I new. I have 2 editText and 1 TextView, 1 button. I want to sum from 2 input. Its success if I input all editText. But if I didn't input, the aplication stopped.</p>
  
  <pre><code>package panda.c;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.EditText;
  
  
  
  
  public class calculate extends Activity implements OnClickListener {
  /** Called when the activity is first created. */
  
  EditText input1,input2;
  Button sum;
  TextView total;
  
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  
  setContentView(R.layout.calcu);
  
  input1 = (EditText) findViewById(R.id.input1);
  input2 = (EditText) findViewById(R.id.input2);
  total = (EditText) findViewById(R.id.total);
  sum = (Button) findViewById(R.id.sum);
  sum.setOnClickListener(this);
  
  }
  
  public void onClick(View v) {
  
  int inputt1 = Integer.parseInt(input1.getText().toString());
  int inputt2 = Integer.parseInt(input2.getText().toString());
  
  switch (v.getId()) {                    
  case R.id.sum:
  
  sum.setText(Integer.toString(inputt1+inputt2));
  
  break;
  default:
  break;
  }}}
  </code></pre>
  
  <p>I didn't input anything. I just clicked sum, and then the program stopped. But if I input all editText, I clicked sum, Its work. why? I want if I do not input, and click sum, the application still run.</p>