android studio : error in Type in number in edittext then do math on it and show result : hi the title says it all
here is the code 




 

    public class Main2Activity extends AppCompatActivity  {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        ImageButton imageButton = (ImageButton) findViewById(R.id.imageButton);
        ImageButton imageButton2 = (ImageButton) findViewById(R.id.imageButton2);
        ImageButton imageButton3= (ImageButton) findViewById(R.id.imageButton3);
        ImageButton imageButton4 = (ImageButton) findViewById(R.id.imageButton4);
        ImageButton imageButton5 = (ImageButton) findViewById(R.id.imageButton5);
        ImageButton imageButton6 = (ImageButton) findViewById(R.id.imageButton6);
        ImageButton imageButton7 = (ImageButton) findViewById(R.id.imageButton7);
        ImageButton imageButton8 = (ImageButton) findViewById(R.id.imageButton8);
        ImageButton imageButton9 = (ImageButton) findViewById(R.id.imageButton9);
        final EditText editText = (EditText) findViewById(R.id.editText);
        EditText editText2 = (EditText) findViewById(R.id.editText2);
        EditText editText3 = (EditText) findViewById(R.id.editText3);
        final TextView textView50 = (TextView)findViewById(R.id.textView50);
        //here where the android monitor says it error

        final int dayNumber = Integer.parseInt(editText.getText().toString());
        editText2.getText();
        editText3.getText();
        imageButton3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
            int a = dayNumber * 4;
                textView50.setText(String.valueOf(a));
            }
        });



and here is the android monitor result

07-31 19:45:54.353 19858-19858/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                   Process: ahmednageeb.com.yourageinotherplanets, PID: 19858
                                                   java.lang.RuntimeException: Unable to start activity ComponentInfo{ahmednageeb.com.package/ahmednageeb.com.package.Main2Activity}: java.lang.NumberFormatException: Invalid int: ""
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                       at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:148)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                    Caused by: java.lang.NumberFormatException: Invalid int: ""
                                                       at java.lang.Integer.invalidInt(Integer.java:138)
                                                       at java.lang.Integer.parseInt(Integer.java:358)
                                                       at java.lang.Integer.parseInt(Integer.java:334)
                                                       at ahmednageeb.com.package.Main2Activity.onCreate(Main2Activity.java:40)
                                                       at android.app.Activity.performCreate(Activity.java:6237)
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                                                       at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                       at android.os.Looper.loop(Looper.java:148) 
                                                       at android.app.ActivityThread.main(ActivityThread.java:5417) 
                                                       at java.lang.reflect.Method.invoke(Native Method) 
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
07-31 19:45:56.587 19858-19858/ahmednageeb.com.package I/Process: Sending signal. PID: 19858 SIG: 9
