EditText et1 = (EditText)findViewById(R.id.et_usertel); String s1 = et1.getText().toString(); System.out.println("1111"+s1); EditText et3 = (EditText)findViewById(R.id.et_password); String s3 = et3.getText().toString().trim(); long num =Long.valueOf(s3) - Long.valueOf(s1);